From d83048f4f8496ca3b429780fafc37140eb5b9794 Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 7 Jun 2022 23:43:51 +0200 Subject: [PATCH] Scoreboard UI and team selection: add SHIFT+TAB shortcuts to reverse cycling --- qcsrc/client/hud/panel/scoreboard.qc | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 531e0c356..1d9268a03 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -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) -- 2.39.2