Add Esc-to-menu toggle as a stopgap for Quit #25

Merged
liamjd merged 1 commit from 18-add-main-menu-to-game into main 2026-08-18 20:52:41 +01:00
Owner

Summary

  • Adds a GameState.main_menu flag (default true, with a main_menu_changed signal) toggled on Escape from game.gd.
  • Embeds main_menu.tscn as a hidden overlay child of game.tscn, driven by that flag, so Quit (and the rest of the main menu) is reachable from the main game screen.
  • This is a deliberate stopgap for Esc>Menu>Quit muscle memory, not the in-game-specific menu described in the issue — that will be designed and built separately later.

Test plan

  • Verified headed: pressing Esc in-game shows the overlay (New Game/Options/Quit), pressing Esc again hides it, Quit closes the game.
  • Confirmed the overlay stays hidden on scene load and doesn't misfire in the editor — GameState.main_menu = false is gated behind not Engine.is_editor_hint(), since GameState isn't reliably available when game.gd runs as @tool in-editor.
  • No automated test coverage added — this is UI wiring, not covered by the existing GUT suite.

Closes #18

🤖 Generated with Claude Code

## Summary - Adds a `GameState.main_menu` flag (default `true`, with a `main_menu_changed` signal) toggled on Escape from `game.gd`. - Embeds `main_menu.tscn` as a hidden overlay child of `game.tscn`, driven by that flag, so Quit (and the rest of the main menu) is reachable from the main game screen. - This is a deliberate stopgap for Esc>Menu>Quit muscle memory, not the in-game-specific menu described in the issue — that will be designed and built separately later. ## Test plan - [x] Verified headed: pressing Esc in-game shows the overlay (New Game/Options/Quit), pressing Esc again hides it, Quit closes the game. - [x] Confirmed the overlay stays hidden on scene load and doesn't misfire in the editor — `GameState.main_menu = false` is gated behind `not Engine.is_editor_hint()`, since `GameState` isn't reliably available when `game.gd` runs as `@tool` in-editor. - [ ] No automated test coverage added — this is UI wiring, not covered by the existing GUT suite. Closes #18 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Embeds main_menu.tscn as a hidden overlay in game.tscn, driven by a new
GameState.main_menu flag toggled on Escape, so there's a reachable Quit
button while in-game. This is a placeholder for muscle-memory
Esc>Menu>Quit and will be rewritten with a proper pause UI later.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
liamjd merged commit edf401be25 into main 2026-08-18 20:52:41 +01:00
liamjd deleted branch 18-add-main-menu-to-game 2026-08-18 20:52:45 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
liamjd/UntitledColonyBuilder!25
No description provided.