]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/item/nexposee.c
Get rid of if not, step 1.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / item / nexposee.c
index 8f8f45119f8744bd74d900776d4b97015bc25406..afe82e8926d7e763a76e0cba7f84ba0da92f4d9c 100644 (file)
@@ -228,7 +228,7 @@ float Nexposee_mousePress(entity me, vector pos)
        }
        else if(me.animationState == 2)
        {
-               if not(SUPER(Nexposee).mousePress(me, pos))
+               if (!(SUPER(Nexposee).mousePress(me, pos)))
                {
                        me.animationState = 3;
                        SUPER(Nexposee).setFocus(me, NULL);
@@ -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;
@@ -291,14 +291,14 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
                        {
                                if(me.selectedChild)
                                        me.selectedChild = me.selectedChild.prevSibling;
-                               if not(me.selectedChild)
+                               if (!me.selectedChild)
                                        me.selectedChild = me.lastChild;
                        }
                        else
                        {
                                if(me.selectedChild)
                                        me.selectedChild = me.selectedChild.nextSibling;
-                               if not(me.selectedChild)
+                               if (!me.selectedChild)
                                        me.selectedChild = me.firstChild;
                        }
                }
@@ -331,7 +331,7 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
                }
                if(me.focusedChild)
                        me.selectedChild = me.focusedChild;
-               if not(me.selectedChild)
+               if (!me.selectedChild)
                        me.animationState = 0;
                SUPER(Nexposee).setFocus(me, NULL);
                return 1;