thierryg
31-01-2012 09:31:30
Hi,
I'm using isFocusKey() to check if the user is typing something in an editBox or not, and if yes, disable the other keyboard shortcuts, to avoid, for example, un-pausing the game if someone type a P in an editBox.
It's working well, but I noticed that MyGui doesn't reset the isFocusKey to false when I click somewhere else on the Panel.
For example :
-I display the Gui, and isFocusKey() is false
-I click in an EditBox, and isFocusKey() is then true
-I click somewhere else in the panel, and the editbox is visually unfocused, but isFocusKey() stay at true
-isFocusKey() goes back to false only if I click outside of the panel.
I tried using getMouseFocusWidget(), but obtained the same result.
Anyone has any idea of what I'm doing wrong ?
Thanks,
T.
I'm using isFocusKey() to check if the user is typing something in an editBox or not, and if yes, disable the other keyboard shortcuts, to avoid, for example, un-pausing the game if someone type a P in an editBox.
It's working well, but I noticed that MyGui doesn't reset the isFocusKey to false when I click somewhere else on the Panel.
For example :
-I display the Gui, and isFocusKey() is false
-I click in an EditBox, and isFocusKey() is then true
-I click somewhere else in the panel, and the editbox is visually unfocused, but isFocusKey() stay at true
-isFocusKey() goes back to false only if I click outside of the panel.
I tried using getMouseFocusWidget(), but obtained the same result.
Anyone has any idea of what I'm doing wrong ?
Thanks,
T.