]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Prioritize scoreboard UI over other things
authorterencehill <piuntn@gmail.com>
Thu, 19 May 2022 21:15:19 +0000 (23:15 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 19 May 2022 21:15:19 +0000 (23:15 +0200)
qcsrc/client/hud/panel/quickmenu.qc
qcsrc/client/hud/panel/radar.qc
qcsrc/client/hud/panel/scoreboard.qc

index 01fae6e0203104e2df63874db8581b32bdced4b5..01a4a2cdb06ea8462f80aff21c09a020eb836ed4 100644 (file)
@@ -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));
index ef209633b76c08f61dec511b18d430cc5a72f44c..598b44d9cd9031e3700b55755194274071311fd2 100644 (file)
@@ -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;
index c74037c69b0a13e3c541b847a38170d90a3a3764..50555381edfd86832bddb90b8d0a2ff286fdb6e6 100644 (file)
@@ -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;