From: terencehill Date: Sun, 1 Jul 2018 12:35:01 +0000 (+0200) Subject: When the hud editor is active disable other mouse and input event handlers since... X-Git-Tag: xonotic-v0.8.5~1843^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=67bd78a77aece6ed531a73ef670bd4ae4265fd26;p=xonotic%2Fxonotic-data.pk3dir.git When the hud editor is active disable other mouse and input event handlers since it's fullscreen and supposed to show panels regardless of their functionalities --- diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index ce70cef5a..3a6d60742 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -363,9 +363,11 @@ void PostInit() // In the case of mouse input after a setcursormode(1) call, nPrimary is xpos, nSecondary is ypos. float CSQC_InputEvent(int bInputType, float nPrimary, float nSecondary) { - TC(int, bInputType); - bool override = false; + TC(int, bInputType); + bool override = false; override |= HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary); + if (override) + return true; override |= QuickMenu_InputEvent(bInputType, nPrimary, nSecondary); diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 71dd61279..3a5f1b5e7 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1583,12 +1583,15 @@ void HUD_Mouse(entity player) if(autocvar__hud_configure) HUD_Panel_Mouse(); - if(HUD_MinigameMenu_IsOpened() || active_minigame) - HUD_Minigame_Mouse(); - if(QuickMenu_IsOpened()) - QuickMenu_Mouse(); - if(HUD_Radar_Clickable()) - HUD_Radar_Mouse(); + else + { + if (HUD_MinigameMenu_IsOpened() || active_minigame) + HUD_Minigame_Mouse(); + if (QuickMenu_IsOpened()) + QuickMenu_Mouse(); + if (HUD_Radar_Clickable()) + HUD_Radar_Mouse(); + } prevMouseClicked = mouseClicked;