harvest/game/tests
Forrest aee60b0ba2 #35: interface scale, safe area, and the mobile test kit
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>
2026-10-14 14:40:06 -04:00
..
mobile #35: interface scale, safe area, and the mobile test kit 2026-10-14 14:40:06 -04:00
pen_ring.gd Task #11: Animal Pen boundary becomes player-built 2026-10-05 14:34:02 -04:00
pen_ring.gd.uid Task #11: Animal Pen boundary becomes player-built 2026-10-05 14:34:02 -04:00
run_tests.gd #35: interface scale, safe area, and the mobile test kit 2026-10-14 14:40:06 -04:00
run_tests.gd.uid init 2026-10-03 12:14:28 -04:00
test_campaign.gd Task #27: the thirty nights 2026-10-06 16:38:07 -04:00
test_campaign.gd.uid init 2026-10-03 12:14:28 -04:00
test_coop.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
test_coop.gd.uid updates 2026-10-04 12:07:36 -04:00
test_cycle.gd updates 2026-10-07 14:50:55 -04:00
test_cycle.gd.uid updates 2026-10-04 12:07:36 -04:00
test_dialogue.gd #31: intro speakers and conversations 2026-10-07 21:48:31 -04:00
test_dialogue.gd.uid Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers 2026-10-07 21:33:54 -04:00
test_economy.gd UI and other changes 2026-10-07 13:41:38 -04:00
test_economy.gd.uid updates 2026-10-04 12:07:36 -04:00
test_farm_layout.gd UI and other changes 2026-10-07 13:41:38 -04:00
test_farm_layout.gd.uid init 2026-10-03 12:14:28 -04:00
test_farm_state.gd Task #12: animals start loose; herd into the player-built pen 2026-10-05 15:13:20 -04:00
test_farm_state.gd.uid init 2026-10-03 12:14:28 -04:00
test_flow.gd #33: opening intro cutscene 2026-10-07 22:54:24 -04:00
test_flow.gd.uid updates 2026-10-04 12:07:36 -04:00
test_intro.gd #33: opening intro cutscene 2026-10-07 22:54:24 -04:00
test_intro.gd.uid #33: opening intro cutscene 2026-10-07 22:54:24 -04:00
test_loading.gd #32: animated loading screen 2026-10-07 21:46:27 -04:00
test_loading.gd.uid #32: animated loading screen 2026-10-07 21:46:27 -04:00
test_look.gd #30: forced lighting, intro sounds, scarecrow chest glow 2026-10-07 21:51:14 -04:00
test_look.gd.uid UI and other changes 2026-10-07 13:41:38 -04:00
test_mobile.gd #35: interface scale, safe area, and the mobile test kit 2026-10-14 14:40:06 -04:00
test_mobile.gd.uid #35: interface scale, safe area, and the mobile test kit 2026-10-14 14:40:06 -04:00
test_nights.gd updates 2026-10-07 14:50:55 -04:00
test_nights.gd.uid updates 2026-10-04 12:07:36 -04:00
test_outcome.gd updates 2026-10-04 12:07:36 -04:00
test_outcome.gd.uid init 2026-10-03 12:14:28 -04:00
test_radar.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
test_radar.gd.uid Task #8: Radar item, a Supply Shed minimap reveal 2026-10-05 16:08:54 -04:00
test_roster.gd Task #25: arrivals wait for a free character 2026-10-06 16:17:31 -04:00
test_roster.gd.uid updates 2026-10-04 12:07:36 -04:00
test_save.gd UI and other changes 2026-10-07 13:41:38 -04:00
test_save.gd.uid updates 2026-10-04 12:07:36 -04:00
test_scarecrow.gd UI and other changes 2026-10-07 13:41:38 -04:00
test_scarecrow.gd.uid updates 2026-10-04 12:07:36 -04:00
test_structures.gd Task #9 follow-up: make the Workbench genuinely targetable (Decision 3) 2026-10-05 16:46:04 -04:00
test_structures.gd.uid updates 2026-10-04 12:07:36 -04:00
test_targets.gd updates 2026-10-07 14:50:55 -04:00
test_targets.gd.uid updates 2026-10-04 12:07:36 -04:00
test_theft.gd UI and other changes 2026-10-07 13:41:38 -04:00
test_theft.gd.uid updates 2026-10-04 12:07:36 -04:00
test_weapons.gd UI and other changes 2026-10-07 13:41:38 -04:00
test_weapons.gd.uid updates 2026-10-04 12:07:36 -04:00