Integrate per-save identity and interaction UI

This commit is contained in:
Alexander Sellite 2026-09-01 17:30:50 -04:00
parent ac82a28f3b
commit 4fda6e97f6
58 changed files with 3471 additions and 461 deletions

View file

@ -187,6 +187,19 @@ func _validate_primary_menu_navigation() -> void:
)
for title_control: Control in title_controls:
_assert_directionally_reachable(title_control, title_controls)
var version_row := title.get_node("%VersionRow") as Control
title.call("_on_continue_pressed")
await process_frame
_expect(
not version_row.visible,
"The title version remains visible behind the Save Slots panel.",
)
title.call("_close_save_slots")
await process_frame
_expect(
version_row.visible,
"The title version was not restored after closing Save Slots.",
)
title.queue_free()
await process_frame
@ -221,7 +234,17 @@ func _validate_save_slots_navigation() -> void:
await create_timer(0.25).timeout
var saves_tab := page.get_node("%SavesTab") as Button
var new_tab := page.get_node("%NewSlotTab") as Button
var main_panel := page.get_node("%MainPanel") as PanelContainer
var content_panel := page.get_node("%ContentPanel") as PanelContainer
var back_button := page.get_node("%BackButton") as Button
_expect(
main_panel.size.is_equal_approx(Vector2(880.0, 660.0)),
"Save Slots changed the fixed 880 by 660 outer panel size.",
)
_expect(
main_panel.get_global_rect().encloses(back_button.get_global_rect()),
"The Save Slots Back button extends beyond the outer panel.",
)
var tab_overlap: float = (
saves_tab.get_global_rect().end.y
- content_panel.get_global_rect().position.y
@ -258,6 +281,40 @@ func _validate_save_slots_navigation() -> void:
var duplicate_slot := page.get_node("%DuplicateSlotButton") as Button
var export_slot := page.get_node("%ExportSlotButton") as Button
var delete_slot := page.get_node("%DeleteSlotButton") as Button
var slot_summary := page.get_node("%SlotSummary") as RichTextLabel
slot_summary.text = str(page.call("_format_slot_summary", {
"has_save": true,
"player_level": 100,
"catch_count": 9999,
"discovered_species_count": 999,
"wallet_balance": 999999,
"world_layout": &"generated",
"world_seed": 2147483647,
"last_played_at_unix": 1788282000,
}))
for _frame: int in 2:
await process_frame
var content_rect: Rect2 = content_panel.get_global_rect()
for control: Control in [
import_button,
page.get_node("%SelectedSlotName") as Control,
slot_summary,
page.get_node("%OnlineSlotButton") as Control,
play_slot,
rename_slot,
duplicate_slot,
export_slot,
delete_slot,
]:
_expect(
content_rect.encloses(control.get_global_rect()),
"Save-slot control %s extends beyond the content panel."
% control.name,
)
_expect(
content_rect.end.y <= back_button.get_global_rect().position.y,
"Save-slot content overlaps the Back button.",
)
_expect(
saves_tab.find_valid_focus_neighbor(SIDE_BOTTOM) == import_button,
"An empty Save Slots page does not lead from its tab to Import Save.",
@ -960,6 +1017,18 @@ func _validate_profile_confirmation_focus() -> void:
page.call("set_interactive", true)
page.call("reset_controller_zone")
var name_edit := page.get("_name_edit") as LineEdit
var customize := page.get("_customize_button") as Button
for _frame: int in 2:
await process_frame
_expect(
root.gui_get_focus_owner() == customize,
"Opening Profile activated the player-name field instead of its "
+ "non-text customization action.",
)
_expect(
not name_edit.has_focus(),
"Opening Profile activated the player-name field without user input.",
)
name_edit.grab_focus()
page.call("_on_name_changed", "V")
_expect(