From 67bd78a77aece6ed531a73ef670bd4ae4265fd26 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 1 Jul 2018 14:35:01 +0200 Subject: [PATCH] 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 --- qcsrc/client/main.qc | 6 ++++-- qcsrc/client/view.qc | 15 +++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) 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; -- 2.39.2