Pause Overlay: Don't handle next/previous_tab while unpaused#2390
Conversation
Change the process mode for the whole Control hierarchy of the Pause menu to "WHEN_PAUSED", which was previously set on what is now just one page of it. Move the handling of the next_tab and previous_tab events into _input() in a script attached to the TabContainer, rather than in _unhandled_input() on the PauseOverlay itself. This fixes an issue I was seeing where pressing A/D/X/Z (the keys bound to these two actions) in a menu I am making for the quest separator would cause focus to be taken away from all visible controls.
|
Play this branch at https://play.threadbare.game/branches/endlessm/wjt/pause-overlay-don-t-handle-next-previous-tab-while-unpaused/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
manuq
left a comment
There was a problem hiding this comment.
Ouch I missed this, thanks!
|
I couldn't find any tool in the editor's debug panel to see what was happening to the GUI focus but it was easy enough to drop this line into an appropriate place: print(get_viewport().gui_get_focus_owner()) |
Ha I did that too while implementing the new tabs. In a |
Change the process mode for the whole Control hierarchy of the Pause
menu to "WHEN_PAUSED", which was previously set on what is now just one
page of it.
Move the handling of the next_tab and previous_tab events into _input()
in a script attached to the TabContainer, rather than in
_unhandled_input() on the PauseOverlay itself.
This fixes an issue I was seeing where pressing A/D/X/Z (the keys bound
to these two actions) in a menu I am making for the quest separator
would cause focus to be taken away from all visible controls.