]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/terencehill/menu_focus_stuff'
authorSamual Lenks <samual@xonotic.org>
Wed, 8 May 2013 00:14:05 +0000 (20:14 -0400)
committerSamual Lenks <samual@xonotic.org>
Wed, 8 May 2013 00:14:05 +0000 (20:14 -0400)
qcsrc/menu/item/inputcontainer.c
qcsrc/menu/item/nexposee.c
qcsrc/menu/xonotic/charmap.c

index 65129b294dd6c0229436da186734c244d30b6b6f..4531a1f4e11c2f4917baef0e9d03d4f5bb4ef6f1 100644 (file)
@@ -134,6 +134,8 @@ float InputContainer_mouseDrag(entity me, vector pos)
 }
 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;
index 64da6bcd6de8a93f0919d080bc425f2f358b3762..97eabd7d66beffd07e0263f5474a63c572db5270 100644 (file)
@@ -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;
        }
index 0e375c9cc4654e10f81b938232f25ef36eca3c93..6966aaf481b7460b337387762e542ac171dc7a7f 100644 (file)
@@ -64,7 +64,7 @@ float XonoticCharmap_mouseMove(entity me, vector coords)
                return 0;
        }
        c = y * 16 + x;
-       if(c != me.mouseSelectedCharacterCell)
+       if(c != me.mouseSelectedCharacterCell || me.mouseSelectedCharacterCell != me.selectedCharacterCell)
                me.mouseSelectedCharacterCell = me.selectedCharacterCell = c;
        return 1;
 }