From: terencehill Date: Tue, 7 Jun 2022 21:43:51 +0000 (+0200) Subject: Scoreboard UI and team selection: add SHIFT+TAB shortcuts to reverse cycling X-Git-Tag: xonotic-v0.8.6~409^2~4 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=d83048f4f8496ca3b429780fafc37140eb5b9794 Scoreboard UI and team selection: add SHIFT+TAB shortcuts to reverse cycling --- diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 531e0c3561..1d9268a037 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)