]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
When the hud editor is active disable other mouse and input event handlers since...
authorterencehill <piuntn@gmail.com>
Sun, 1 Jul 2018 12:35:01 +0000 (14:35 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 1 Jul 2018 12:35:01 +0000 (14:35 +0200)
qcsrc/client/main.qc
qcsrc/client/view.qc

index ce70cef5ad5016ffa83790c677c86745934d6151..3a6d60742fb80ec78844047ff09048745195f78a 100644 (file)
@@ -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);
 
index 71dd6127934c778f4e77b127ec821a7debaaa4d3..3a5f1b5e766dd8145ccdae954c3a8cae1b001818 100644 (file)
@@ -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;