From: terencehill Date: Thu, 29 Jul 2010 14:56:17 +0000 (+0200) Subject: yet another shortcut: ctrl-space to enable/disable highlighted panel or dock X-Git-Tag: xonotic-v0.1.0preview~362^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9fc358dd8059aaf61497bda45b9a40cbc631e153;p=xonotic%2Fxonotic-data.pk3dir.git yet another shortcut: ctrl-space to enable/disable highlighted panel or dock --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 8c68bf0bb..be7169dba 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1063,6 +1063,16 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary) if (mouseClicked) return true; + if(nPrimary == K_SPACE) // enable/disable highlighted panel or dock + { + if (bInputType == 1) + return true; + + if (highlightedPanel_prev != -1) + cvar_set(strcat("hud_panel_", panel_name), ftos(!(panel_enabled))); + else + cvar_set(strcat("hud_dock"), (autocvar_hud_dock == "") ? "dock" : ""); + } if(nPrimary == 'c') // copy highlighted panel size { if (bInputType == 1)