Skip to content

input_hud: Hide when paused & during transitions#2097

Merged
manuq merged 1 commit intomainfrom
wjt/input-hud-hide-when-paused-during-transitions
Apr 2, 2026
Merged

input_hud: Hide when paused & during transitions#2097
manuq merged 1 commit intomainfrom
wjt/input-hud-hide-when-paused-during-transitions

Conversation

@wjt
Copy link
Copy Markdown
Member

@wjt wjt commented Apr 2, 2026

No description provided.

@wjt wjt requested a review from a team as a code owner April 2, 2026 12:31
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Play this branch at https://play.threadbare.game/branches/endlessm/wjt/input-hud-hide-when-paused-during-transitions/.

(This launches the game from the start, not directly at the change(s) in this pull request.)



func _update_visibility() -> void:
visible = not get_tree().paused and not Transitions.is_running() and (player or sokoban_ruleset)
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.

👍

func _notification(what: int) -> void:
match what:
NOTIFICATION_PAUSED, NOTIFICATION_UNPAUSED:
_update_visibility()
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.

I wasn't aware of these notifications, nice. This does the job.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Nor was I, till I searched while writing this. I like this because it keeps InputHud & PauseOverlay ignorant of each other.

Of course… you might imagine in future we could put the InputHud over the PauseOverlay and show the arrow keys plus "[ space ] Click" or something. Another day.

@manuq manuq merged commit 5c71655 into main Apr 2, 2026
6 checks passed
@manuq manuq deleted the wjt/input-hud-hide-when-paused-during-transitions branch April 2, 2026 12:53
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