Skip to content

Pause Overlay: Don't handle next/previous_tab while unpaused#2390

Merged
manuq merged 1 commit into
mainfrom
wjt/pause-overlay-don-t-handle-next-previous-tab-while-unpaused
Jun 16, 2026
Merged

Pause Overlay: Don't handle next/previous_tab while unpaused#2390
manuq merged 1 commit into
mainfrom
wjt/pause-overlay-don-t-handle-next-previous-tab-while-unpaused

Conversation

@wjt

@wjt wjt commented Jun 16, 2026

Copy link
Copy Markdown
Member

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.

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.
@wjt wjt requested a review from a team as a code owner June 16, 2026 13:37
@github-actions

Copy link
Copy Markdown

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 manuq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch I missed this, thanks!

@manuq manuq merged commit 795add1 into main Jun 16, 2026
7 checks passed
@manuq manuq deleted the wjt/pause-overlay-don-t-handle-next-previous-tab-while-unpaused branch June 16, 2026 13:50
@wjt

wjt commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

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())

@manuq

manuq commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

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 _process() it was a bit too much output but it really helped. I was expecting something in the Remote dock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants