From: terencehill Date: Sat, 19 Mar 2022 11:21:19 +0000 (+0100) Subject: Fix #2675 "Quickmenu closes when navigated by mouse" X-Git-Tag: xonotic-v0.8.5~153 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6cd7e1826d91c34c4fc8beb338e1f7eb2eaebb7c;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2675 "Quickmenu closes when navigated by mouse" --- diff --git a/qcsrc/client/hud/panel/quickmenu.qc b/qcsrc/client/hud/panel/quickmenu.qc index 6310a0e69..51f1e7373 100644 --- a/qcsrc/client/hud/panel/quickmenu.qc +++ b/qcsrc/client/hud/panel/quickmenu.qc @@ -449,6 +449,8 @@ bool QuickMenu_InputEvent(int bInputType, float nPrimary, float nSecondary) // at this point bInputType can only be 0 or 1 (key pressed or released) bool key_pressed = (bInputType == 0); + int hudShiftState_prev = hudShiftState; + int mouseClicked_prev = mouseClicked; if(key_pressed) { if(nPrimary == K_ALT) hudShiftState |= S_ALT; @@ -474,7 +476,7 @@ bool QuickMenu_InputEvent(int bInputType, float nPrimary, float nSecondary) { QuickMenu_Page_ActiveEntry(stof(chr2str(nPrimary))); } - else + else if (hudShiftState_prev == hudShiftState && mouseClicked_prev == mouseClicked) { // allow console bind to work string con_keys = findkeysforcommand("toggleconsole", 0);