#37: platform back button, no Quit on phones, flat labels, camera

- Android back: application/config/quit_on_go_back=false; Main.go_back()
  (from NOTIFICATION_WM_GO_BACK_REQUEST, phones only) closes the shop or
  pouch panel or leaves build mode, else pauses; paused it closes the
  question, then settings, then resumes (shared with the pause action);
  at the main menu it closes the question or settings, else quits.
- Phones hide the main menu's Quit and the pause menu's Quit the game.
- ScreenLabels.ensure() makes the one ScreenLabels (ToonLook's on
  desktop; Main's on phones, which watch()es the tree for Label3Ds).
  Label sizes grow with the window's content_scale_factor (1 on desktop).
- FollowCamera starts at PHONE_DISTANCE (12 m) on phones.
- MobilePort.forced for tests; game/tests/mobile/platform_test.gd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Forrest 2026-10-14 14:35:53 -04:00
parent f0291133fd
commit c47e67891e
10 changed files with 368 additions and 23 deletions

View file

@ -3,8 +3,8 @@ extends CenterContainer
## Escape / Start during play (Main pauses the tree), hand-drawn like the HUD's pouch panel
## (UiTheme.sketch): where you are and what's left to protect
## (crops, animals, supplies; asset_counts), then Resume, Restart the night, Settings, Save & quit
## to the menu, and Quit the game, with a reminder of what Continue picks up (the vacation is
## saved every morning).
## to the menu, and Quit the game (not on phones, MobilePort), with a reminder of what Continue
## picks up (the vacation is saved every morning).
signal resume_requested
signal restart_requested
@ -65,6 +65,7 @@ func _ready() -> void:
menu_button.pressed.connect(func() -> void: menu_requested.emit())
quit_button = _button(box, "Quit the game")
quit_button.pressed.connect(func() -> void: quit_requested.emit())
quit_button.visible = not MobilePort.active() # phones: the system closes apps
_note = Label.new()
_note.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
_note.custom_minimum_size = Vector2(520.0, 0.0)