From: terencehill Date: Thu, 19 May 2022 21:15:19 +0000 (+0200) Subject: Prioritize scoreboard UI over other things X-Git-Tag: xonotic-v0.8.6~409^2~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7bc214a561c4cf2bd0100d12b630b1f923841253;p=xonotic%2Fxonotic-data.pk3dir.git Prioritize scoreboard UI over other things --- diff --git a/qcsrc/client/hud/panel/quickmenu.qc b/qcsrc/client/hud/panel/quickmenu.qc index 01fae6e02..01a4a2cdb 100644 --- a/qcsrc/client/hud/panel/quickmenu.qc +++ b/qcsrc/client/hud/panel/quickmenu.qc @@ -70,6 +70,7 @@ void QuickMenu_Page_ClearEntry(int i) bool HUD_QuickMenu_Forbidden() { return (mv_active + || scoreboard_ui_enabled || (hud_configure_prev && hud_configure_prev != -1) || HUD_MinigameMenu_IsOpened() || (QuickMenu_TimeOut && time > QuickMenu_TimeOut)); diff --git a/qcsrc/client/hud/panel/radar.qc b/qcsrc/client/hud/panel/radar.qc index ef209633b..598b44d9c 100644 --- a/qcsrc/client/hud/panel/radar.qc +++ b/qcsrc/client/hud/panel/radar.qc @@ -136,13 +136,7 @@ void HUD_Radar_Mouse() if ( !hud_panel_radar_mouse ) return; if(mv_active) return; - if ( intermission ) - { - HUD_Radar_Hide_Maximized(); - return; - } - - if(mouseClicked & S_MOUSE2) + if (intermission || scoreboard_ui_enabled || (mouseClicked & S_MOUSE2)) { HUD_Radar_Hide_Maximized(); return; diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index c74037c69..50555381e 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -333,7 +333,7 @@ float HUD_Scoreboard_InputEvent(float bInputType, float nPrimary, float nSeconda } else if(nPrimary == K_ENTER || nPrimary == K_SPACE || nPrimary == K_KP_ENTER) { - if (bInputType == 1) + if (!key_pressed) return true; if (scoreboard_selected_panel == SB_PANEL_SCOREBOARD) { @@ -351,7 +351,7 @@ float HUD_Scoreboard_InputEvent(float bInputType, float nPrimary, float nSeconda } else if(nPrimary == 't' && (hudShiftState & S_CTRL)) { - if (bInputType == 1) + if (!key_pressed) return true; if (scoreboard_selected_panel == SB_PANEL_SCOREBOARD) { @@ -367,7 +367,7 @@ float HUD_Scoreboard_InputEvent(float bInputType, float nPrimary, float nSeconda } else if(nPrimary == 'k' && (hudShiftState & S_CTRL)) { - if (bInputType == 1) + if (!key_pressed) return true; if (scoreboard_selected_panel == SB_PANEL_SCOREBOARD) { @@ -1435,7 +1435,9 @@ vector Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_size) bool Scoreboard_WouldDraw() { - if (MUTATOR_CALLHOOK(DrawScoreboard)) + if (scoreboard_ui_enabled) + return true; + else if (MUTATOR_CALLHOOK(DrawScoreboard)) return false; else if (QuickMenu_IsOpened()) return false;