]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
After a menu item has lost the focus by pressing TAB, put the focus again on that...
authorterencehill <piuntn@gmail.com>
Sat, 21 Jan 2012 21:54:07 +0000 (22:54 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 25 Jan 2012 16:17:16 +0000 (17:17 +0100)
qcsrc/menu/item/inputcontainer.c
qcsrc/menu/item/nexposee.c
qcsrc/menu/xonotic/charmap.c

index e1b14d3b1602d468d08ccdf6b26ef0aaf48b43df..f1529752e1fd414e349ec9cf9dfe8f4e1941f11b 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 02f12242525835f1735029b0eda0365f03907faf..ef4b17d0eab781d5effccff26b800ae8c988f5f4 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;
 }