]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
yet another shortcut: ctrl-space to enable/disable highlighted panel or dock
authorterencehill <piuntn@gmail.com>
Thu, 29 Jul 2010 14:56:17 +0000 (16:56 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 29 Jul 2010 14:56:17 +0000 (16:56 +0200)
qcsrc/client/hud.qc

index 8c68bf0bbe753f780cdfc9ae196851bb1cfd28e2..be7169dba40659f8d7b4d23b824a3cc1333a5bcd 100644 (file)
@@ -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)