]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Scoreboard UI and team selection: add SHIFT+TAB shortcuts to reverse cycling
authorterencehill <piuntn@gmail.com>
Tue, 7 Jun 2022 21:43:51 +0000 (23:43 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 7 Jun 2022 21:43:51 +0000 (23:43 +0200)
qcsrc/client/hud/panel/scoreboard.qc

index 531e0c35618f04db70303e5bef22dad11326e593..1d9268a03734508c71ec718fb57f63fb5cbb2a28 100644 (file)
@@ -272,13 +272,29 @@ float HUD_Scoreboard_InputEvent(float bInputType, float nPrimary, float nSeconda
                if (!key_pressed)
                        return true;
                if (scoreboard_ui_enabled == 2)
-                       goto downarrow_action;
+               {
+                       if (hudShiftState & S_SHIFT)
+                               goto uparrow_action;
+                       else
+                               goto downarrow_action;
+               }
 
-               ++scoreboard_selected_panel;
-               if (scoreboard_selected_panel == SB_PANEL_RANKINGS && !rankings_cnt)
+               if (hudShiftState & S_SHIFT)
+               {
+                       --scoreboard_selected_panel;
+                       if (scoreboard_selected_panel == SB_PANEL_RANKINGS && !rankings_cnt)
+                               --scoreboard_selected_panel;
+                       if (scoreboard_selected_panel < SB_PANEL_FIRST)
+                               scoreboard_selected_panel = SB_PANEL_MAX;
+               }
+               else
+               {
                        ++scoreboard_selected_panel;
-               if (scoreboard_selected_panel > SB_PANEL_MAX)
-                       scoreboard_selected_panel = SB_PANEL_FIRST;
+                       if (scoreboard_selected_panel == SB_PANEL_RANKINGS && !rankings_cnt)
+                               ++scoreboard_selected_panel;
+                       if (scoreboard_selected_panel > SB_PANEL_MAX)
+                               scoreboard_selected_panel = SB_PANEL_FIRST;
+               }
 
                scoreboard_selected_panel_time = time;
        }
@@ -344,6 +360,7 @@ float HUD_Scoreboard_InputEvent(float bInputType, float nPrimary, float nSeconda
        {
                if (!key_pressed)
                        return true;
+               LABEL(uparrow_action);
                if (scoreboard_selected_panel == SB_PANEL_SCOREBOARD)
                {
                        if (scoreboard_ui_enabled == 2)