I feel like this should be a simple solution but I haven’t found it yet. I’ve got a chat in my game and when it launches, the text field is immediately focused, preventing players from moving around as instead they type into the field. I found out how to disable it and was hoping to be able to toggle between an enabled/disabled state, but it doesn’t seem to work. Does something on the screen always have to take focus? If so I can just switch focus to something that doesn’t require input until they want to type again. Besides that though I’m not sure now to toggle focus on the text field.
This thread was on a similar subject and says disabling the control should work:
I essentially have something like that in the link you posted, but it’s the input handler that does it. As far as I can tell, once the text field is disabled, the input handler no longer listens for events. At least, checking isEnabled() and then calling setFocus()/enable() doesn’t seem to work through it once It’s been disabled.
Also, does the ‘Tab’ key by default cycle the screens focus through the focusable Elements?
@Jake-Steel said: Also, does the 'Tab' key by default cycle the screens focus through the focusable Elements?
Yes it does.