]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Minigames: implement correct handling of cursor if hud_cursor_mode is 0; it fixes...
authorterencehill <piuntn@gmail.com>
Sun, 27 Dec 2020 22:59:02 +0000 (23:59 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 27 Dec 2020 22:59:02 +0000 (23:59 +0100)
qcsrc/common/minigames/cl_minigames_hud.qc

index ee7e63414fe80df413bfee0b1085df1ef2d379bc..861e01be3dd3255aac47840e5b5fe165df5cf514 100644 (file)
@@ -619,6 +619,13 @@ float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary
                return true;
        }
 
+       if(bInputType == 2)
+       {
+               if ( active_minigame && HUD_mouse_over(HUD_PANEL(MINIGAMEBOARD)) )
+                       active_minigame.minigame_event(active_minigame,"mouse_moved",mousepos);
+               return false;
+       }
+
        if(bInputType == 0) {
                if(nPrimary == K_ALT) hudShiftState |= S_ALT;
                if(nPrimary == K_CTRL) hudShiftState |= S_CTRL;
@@ -659,8 +666,6 @@ float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary
                if ( device && active_minigame.minigame_event(
                                active_minigame,strcat(device,"_",action),nPrimary) )
                        return true;
-
-               /// TODO: bInputType == 2?
        }
 
        if ( bInputType == 0 )