Phase 19 — onboarding: hint tour + Help modal + tooltip pass
Three-agent fan-out (gdscript-refactor x3) ships the chosen Phase 19 approach: contextual hints during first session + a Help reference, plus a sweep of hover tooltips for desktop discoverability. - HintSystem (autoload) + HintOverlay (layer 22 top-center banner): 7-step tour gated on player events — welcome (boot+2s), pawn select, build drawer open, stockpile painted, work matrix open, day_ended, tour_complete. Per-hint dismissals persist as Array[String] in GameState.settings['dismissed_hints']. Max-3 FIFO queue if hints chain. Reduce-motion path snaps in/out instead of tweening. Reset_tour() public API for the Help modal. - HelpModal (layer 20): 5-tab static reference (Controls / Verbs / Priorities / Storyteller / Tips). Opens via EventBus.help_requested, dimmed backdrop, X/Esc/backdrop-tap dismiss. SettingsMenu gains an 'Onboarding' section: Show-hints checkbox, Help button (emits help_requested), Reset hints button (calls HintSystem.reset_tour with has_method guard). Pre-existing 'W' keybind reference fixed to 'P'. - Tooltip pass: tooltip_text via Strings.t on every TopBar button (10 buttons incl. speed shortcuts), BuildDrawer FAB, and every tool button in BuildDrawer (21 tools). _add_tool_btn extended with optional tooltip param. ~34 new tooltip.* string keys. Contracts pre-written (Opus): EventBus.help_requested, hint_dismissed, ui_panel_opened signals; GameState show_hints + dismissed_hints defaults; BuildDrawer.open + WorkPriorityMatrix.open emit ui_panel_opened so HintSystem can subscribe via one signal. Also recorded [MED] known bug in memory.md: drag-paint with active paint tool is eaten by camera drag-pan. MCP runtime verified: welcome banner fires 2s after boot, dismiss queues build_drawer hint on next ui_panel_opened, dismissed_hints persisted as ['welcome'], HelpModal opens via help_requested with tab switching working (Controls → Tips verified visually). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bba1ce4334
commit
59ca6ba9c5
16 changed files with 844 additions and 22 deletions
|
|
@ -54,6 +54,14 @@ func _ready() -> void:
|
|||
ultra_btn.text = Strings.t(&"speed.ultra")
|
||||
save_btn.text = Strings.t(&"ui.save")
|
||||
load_btn.text = Strings.t(&"ui.load")
|
||||
|
||||
# Phase 19 — desktop hover tooltips (no-op on touch).
|
||||
pause_btn.tooltip_text = Strings.t(&"tooltip.pause")
|
||||
normal_btn.tooltip_text = Strings.t(&"tooltip.speed_normal")
|
||||
fast_btn.tooltip_text = Strings.t(&"tooltip.speed_fast")
|
||||
ultra_btn.tooltip_text = Strings.t(&"tooltip.speed_ultra")
|
||||
save_btn.tooltip_text = Strings.t(&"tooltip.save")
|
||||
load_btn.tooltip_text = Strings.t(&"tooltip.load")
|
||||
tick_label.text = "(boot)"
|
||||
clock_label.text = Strings.t(&"clock.format").format({"d": 1, "t": "06:00"})
|
||||
season_label.text = Strings.t(&"season.format").format({"s": Strings.t(&"season.spring"), "d": 1})
|
||||
|
|
@ -159,6 +167,7 @@ func _add_build_btn() -> void:
|
|||
build_btn.text = "🔨"
|
||||
build_btn.custom_minimum_size = Vector2(40, 40)
|
||||
build_btn.focus_mode = Control.FOCUS_NONE
|
||||
build_btn.tooltip_text = Strings.t(&"tooltip.build")
|
||||
build_btn.pressed.connect(_on_build_pressed)
|
||||
button_row.add_child(build_btn)
|
||||
Audit.log("top_bar", "Build button added to ButtonRow")
|
||||
|
|
@ -183,6 +192,7 @@ func _add_settings_btn() -> void:
|
|||
settings_btn.text = "⚙"
|
||||
settings_btn.custom_minimum_size = Vector2(40, 40)
|
||||
settings_btn.focus_mode = Control.FOCUS_NONE
|
||||
settings_btn.tooltip_text = Strings.t(&"tooltip.settings")
|
||||
settings_btn.pressed.connect(_on_settings_pressed)
|
||||
button_row.add_child(settings_btn)
|
||||
Audit.log("top_bar", "Settings button added to ButtonRow")
|
||||
|
|
@ -208,6 +218,7 @@ func _add_work_log_btns() -> void:
|
|||
work_btn.text = "👷"
|
||||
work_btn.custom_minimum_size = Vector2(40, 40)
|
||||
work_btn.focus_mode = Control.FOCUS_NONE
|
||||
work_btn.tooltip_text = Strings.t(&"tooltip.work")
|
||||
work_btn.pressed.connect(_on_work_pressed)
|
||||
button_row.add_child(work_btn)
|
||||
|
||||
|
|
@ -216,6 +227,7 @@ func _add_work_log_btns() -> void:
|
|||
_log_btn.text = "🔔"
|
||||
_log_btn.custom_minimum_size = Vector2(40, 40)
|
||||
_log_btn.focus_mode = Control.FOCUS_NONE
|
||||
_log_btn.tooltip_text = Strings.t(&"tooltip.log")
|
||||
_log_btn.pressed.connect(_on_log_pressed)
|
||||
button_row.add_child(_log_btn)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue