]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/item/nexposee.c
Merge remote-tracking branch 'origin/master' into terencehill/menu_focus_stuff
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / item / nexposee.c
index 304bf1dd241c053fa707c13a39898f4a0377fcbf..97eabd7d66beffd07e0263f5474a63c572db5270 100644 (file)
@@ -209,7 +209,7 @@ void Nexposee_draw(entity me)
        }
 
        SUPER(Nexposee).draw(me);
-};
+}
 
 float Nexposee_mousePress(entity me, vector pos)
 {
@@ -263,7 +263,7 @@ float Nexposee_mouseMove(entity me, vector pos)
        if(me.animationState == 0)
        {
                if(me.mouseFocusedChild)
-                       if(me.mouseFocusedChild != e)
+                       if(me.mouseFocusedChild != e || me.mouseFocusedChild != me.selectedChild)
                                me.selectedChild = me.mouseFocusedChild;
                return 1;
        }
@@ -279,7 +279,7 @@ float Nexposee_keyUp(entity me, float scan, float ascii, float shift)
 
 float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
 {
-       float nexposeeKey;
+       float nexposeeKey = 0;
        if(me.animationState == 2)
                if(SUPER(Nexposee).keyDown(me, scan, ascii, shift))
                        return 1;
@@ -305,6 +305,7 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
        }
        switch(me.animationState)
        {
+               default:
                case 0:
                case 3:
                        nexposeeKey = ((scan == K_SPACE) || (scan == K_ENTER) || (scan == K_KP_ENTER));
@@ -318,6 +319,7 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
        {
                switch(me.animationState)
                {
+                       default:
                        case 0:
                        case 3:
                                me.animationState = 1;