On phones (MobilePort.active()) the morning sign, the end screens, and the
workbench's and shed's menus sit in the safe area; their long part scrolls
(UiTheme.TouchScroll: a finger drag scrolls and never presses, a tap does)
with Start the day / the end buttons / Close always in view below it; rows
and buttons are at least the touch target; long text wraps. Desktop layout
is unchanged (panels_test checks the 1920x1080 rects against the old ones).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TouchButtons (phones only, Main adds it beside TouchSticks): Pause, Fear, Bomb,
Patch, Use (word from the new read-only Interactions.focus_info()) and Build,
round Sketch buttons that press the existing actions for at least one physics
tick, shown only when they can do something and hidden whenever the tree is
paused or a menu, panel or sign is up. Columns follow TouchSticks.move_on_right
(now a variable); both join "touch_controls" with apply_settings (Swap sticks),
which Main calls at startup; Prompts.move_side() reads the live sticks. Stick
fingers keep their drags over buttons. New Sketch icons: fear, patch, use,
build, pause. Test: game/tests/mobile/buttons_test.gd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On phones the main menu, pause menu, question box, and settings fit the
scaled canvas inside the safe area, with buttons and rows at least 44 pt
tall (19.5:9 at 1.6x, the iPhone SE at the 1.7 cap, 4:3 iPads). The
pause menu puts its buttons in a column beside the rest.
Phone settings: Audio, Touch (Interface size, Swap sticks, Camera
distance, Haptics, and a short touch-controls guide), Display (3D
resolution scale), and Gameplay. The list scrolls by dragging, and a
slider only moves after a mostly sideways drag. GameSettings saves the
touch settings under [touch] and applies them live (&"touch_controls",
the follow camera on phones). A hit buzzes the phone with Haptics on.
Desktop menus are unchanged. Test: game/tests/mobile/menus_test.gd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On phones (MobilePort.active()) the HUD's widgets take taps through small
STOP hit targets (ScarecrowHud.HitTarget, at least minimum_target()), and
everything beside them is still the thumbsticks':
- hotbar: a tap on a main slot picks it through the number keys' path
(weapon_k, applied only when combat may switch); no number keys on phones
(Prompts.hotbar_key)
- backpack: a tap toggles the pouch panel, a finger elsewhere (not on the
panel) closes it; the panel stays inside safe_rect
- tip box: an × hides tips as Backspace does (Tutorial.hide_tips)
- dialogue: a Skip button on pausing conversations; a tap elsewhere advances
Desktop has no targets and draws as before. Test: mobile/hud_taps_test.gd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The user lowered the cap from 1.8 so the smallest iPhones (SE, 13 mini) keep a canvas about
635 px tall. GameSettings gains swap_sticks, camera_distance (FollowCamera.PHONE_DISTANCE) and
haptics, unsaved for now, so #38's apply_settings and #41's settings can be built in parallel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MobilePort: ui_scale() (clampf(4.3 / the screen's shorter side in inches, 1, 1.8) times the
Interface size; 1 on desktop), a size-class fallback (below 500 pt = phone, 1.6) when the
density is 0 or implausible, safe_rect(ci) (the display's safe area mapped into ci's canvas
through the final transform), minimum_target() (44 pt in canvas pixels), and the `forced`
override for tests. The desktop preview (-- --mobile) plays the phone in the window:
--safe-area=l,t,r,b insets it, --dpi=N sets its density, and without --dpi a 16:9-or-wider
window is a 2.7 in phone (about 1.6x) and a squarer one a 6 in iPad (1x).
GameSettings: interface_size (0.8-1.3, saved under [touch]) and apply_scale(), which sets the
window's content_scale_factor (always 1 on desktop). PerfTest shows the screen, density, safe
area, and resulting scale, to check the density on a device.
Test kit: test_mobile (last in SUITES) runs game/tests/mobile/*_test.gd in name order and puts
the root window back between files; mobile/touch.gd sends touches through
Input.parse_input_event; scale_test covers phones, iPads, desktop, the safe rect, and the target;
sticks_test is the 8c81d81 driver's 24 checks. game/tools/capture_mobile.gd takes the phone
screenshots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
Prompts (game/scripts/prompts.gd) holds every key-naming prompt: on a phone
(MobilePort.active()) it says each in touch words, elsewhere exactly the old
string. World labels drop the key (Gather, Repair, Upgrade to, Upgrades, Shop),
the build ghost says Place / Dismantle, the build bar's line is
"Place · Rotate · Dismantle · Done" and its slots drop the number keys, the
cutscenes say "Hold to skip" / "Tap to skip", the tip footer says
"× hides tips", and the tutorial's tips and the first morning's sign name the
thumbs (sides from TouchSticks), Use, Build, Place, Fear, Bomb, Patch, the
hotbar, and the backpack. MobilePort gains the `forced` test override.
game/tests/mobile/prompts_test.gd checks every phone string and that the
desktop strings are byte for byte as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>