}
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;
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;
}
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;
}