]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Close quickmenu activating the menu items with numbers, unless CTRL is pressed
authorterencehill <piuntn@gmail.com>
Mon, 23 Feb 2015 15:25:08 +0000 (16:25 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 23 Feb 2015 15:25:08 +0000 (16:25 +0100)
qcsrc/client/hud.qc

index b089672e6ec9f944d469d8af12e107efe8530c53..1ed7ffe5efca15c3617f5ef4279fb237804ea63e 100644 (file)
@@ -4872,7 +4872,9 @@ bool HUD_QuickMenu_InputEvent(float bInputType, float nPrimary, float nSecondary
        {
                if (bInputType == 1)
                        return true;
-               HUD_QuickMenu_ActionForNumber(stof(chr2str(nPrimary)));
+               float f = HUD_QuickMenu_ActionForNumber(stof(chr2str(nPrimary)));
+               if(f && !(hudShiftState & S_CTRL))
+                       HUD_QuickMenu_Close();
        }
        if(nPrimary == K_MOUSE1)
        {