Merge remote-tracking branch 'origin/master' into terencehill/menu_focus_stuff
authorSamual Lenks <samual@xonotic.org>
Wed, 8 May 2013 00:11:53 +0000 (20:11 -0400)
committerSamual Lenks <samual@xonotic.org>
Wed, 8 May 2013 00:11:53 +0000 (20:11 -0400)
1  2 
qcsrc/menu/item/inputcontainer.c
qcsrc/menu/item/nexposee.c

@@@ -134,8 -134,6 +134,8 @@@ float InputContainer_mouseDrag(entity m
  }
  float InputContainer_mouseMove(entity me, vector pos)
  {
 +      if(me.mouseFocusedChild != me.focusedChild) // if the keyboard moved the focus away
 +              me.mouseFocusedChild = NULL; // force focusing
        if(me._changeFocusXY(me, pos))
                if(SUPER(InputContainer).mouseMove(me, pos))
                        return 1;
@@@ -155,8 -153,7 +155,7 @@@ float InputContainer_mousePress(entity 
  }
  float InputContainer_mouseRelease(entity me, vector pos)
  {
-       float r;
-       r = SUPER(InputContainer).mouseRelease(me, pos);
+       SUPER(InputContainer).mouseRelease(me, pos); // return value?
        if(me.focused) // am I still eligible for this? (UGLY HACK, but a mouse event could have changed focus away)
                if(me._changeFocusXY(me, pos))
                        return 1;
@@@ -263,7 -263,7 +263,7 @@@ float Nexposee_mouseMove(entity me, vec
        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 +279,7 @@@ float Nexposee_keyUp(entity me, float s
  
  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;
        }
        switch(me.animationState)
        {
+               default:
                case 0:
                case 3:
                        nexposeeKey = ((scan == K_SPACE) || (scan == K_ENTER) || (scan == K_KP_ENTER));
        {
                switch(me.animationState)
                {
+                       default:
                        case 0:
                        case 3:
                                me.animationState = 1;