Skip to content

Add pause screen with restart button#93

Open
wjt wants to merge 1 commit into
mainfrom
wjt/pause-screen
Open

Add pause screen with restart button#93
wjt wants to merge 1 commit into
mainfrom
wjt/pause-screen

Conversation

@wjt
Copy link
Copy Markdown
Member

@wjt wjt commented May 22, 2026

It's annoying to not be able to restart a game when you enter the win/lose state without refreshing the web page or hitting "restart" in the Godot editor.

Save the Theme resource from hud.tscn to its own file so it can be reused on the pause screen, and move an override to the theme. Put the theme.tres and this new scene into a components/ui folder. Leave hud.tscn at the top level - I think it's a weird place but maybe we teach it.

Add a simple pause screen global, with Resume, Restart, and (on non-web only) Quit.

This is copied from one of my personal projects, which is also MIT-licensed. https://codeberg.org/wjt/bgcolor-2025/src/branch/main/scripts/pause_screen.gd https://codeberg.org/wjt/bgcolor-2025/src/branch/main/scenes/pause_screen.tscn

Resolves #92

It's annoying to not be able to restart a game when you enter the win/lose state
without refreshing the web page or hitting "restart" in the Godot editor.

Save the Theme resource from hud.tscn to its own file so it can be reused on the
pause screen, and move an override to the theme. Put the theme.tres and this new
scene into a components/ui folder. Leave hud.tscn at the top level - I think
it's a weird place but maybe we teach it.

Add a simple pause screen global, with Resume, Restart, and (on non-web only)
Quit.

This is copied from one of my personal projects, which is also MIT-licensed.
https://codeberg.org/wjt/bgcolor-2025/src/branch/main/scripts/pause_screen.gd
https://codeberg.org/wjt/bgcolor-2025/src/branch/main/scenes/pause_screen.tscn

Resolves #92
@wjt wjt requested a review from a team as a code owner May 22, 2026 20:36
@github-actions
Copy link
Copy Markdown

Play this branch at https://endlessm.github.io/moddable-platformer/branches/endlessm/wjt/pause-screen/.

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

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.

Add pause screen with "Restart" button

1 participant