Close every top modal through one Esc and right-click path
Full build / Import + headless tests (push) Successful in 37s
Full build / Full desktop build + optional release (push) Skipped

- Add Help, Settings, Pause and review to the top-modal close chain so right-click and Esc behave consistently.
- Restore the venue menu after menu Settings and prevent Help from opening Pause behind itself.
- Reopen pause after in-shift Settings apply and recapture the mouse/unfreeze state on close.
- Extend the session smoke for menu Settings, right-click Help and guard unfreeze.
This commit is contained in:
Gig Line Dev committed 2026-11-02 16:10:50 +01:00
1 parent 8f65751975
commit 26e6dd6413
8 files changed
+111 -6

No files matched your search

+25 -1
View File
@@ -1,6 +1,6 @@
# UI copy and button inventory
Status: dialogue, button-state and keyboard/gamepad focus passes complete; layout/end-to-end audit in progress for 0.9.3.
Status: dialogue, button-state, focus and modal-close passes complete; layout/end-to-end audit in progress for 0.9.3.
## Screen inventory
@@ -128,6 +128,30 @@ events.
| Radio | Send action. | B/Esc cancels; form fields, action and Cancel are linked; A confirms the focused action. |
| Tutorial | None; F1 is the documented skip shortcut. | Keyboard-only by design, no focus trap because the card is mouse-transparent and non-modal. |
## Modal close and pointer recapture
`GameManager._close_top_modal()` is now the single close path for the top
interactive layer. It handles the radial, inspection, wand, radio, timeline,
Help, Settings, Pause and review before Esc/right-click falls back to target
clearing or pause. `_refresh_freeze()` recaptures the mouse when the shift
resumes; `_show_start_menu()` keeps the pointer visible at the menu.
| Surface | Close routes | Result |
| --- | --- | --- |
| Pause | Resume, Esc, right-click | Closes via one path; guard unfreezes and mouse recaptures. |
| Settings | Apply settings, Cancel, Esc, right-click | From the venue menu, both apply and cancel restore the menu. From a shift, cancel returns to the game with the guard unfrozen; apply returns to pause. |
| Help | Close, Esc, right-click | Closes only Help; it no longer opens Pause behind the overlay. Returns to whatever was underneath. |
| Shift review | Return to menu, Esc, right-click | Returns to the venue menu with the pointer visible. |
| Timeline | Close, Esc, right-click | Returns to the review and keeps the pointer visible. |
| Radio | Cancel, Esc, right-click | Closes the form, clears the action hint and recaptures the mouse. |
| Inspection / wand | Esc, right-click | Closes the panel, unfreezes the guard and recaptures the mouse. |
| Action wheel | Esc, right-click | Cancels without a log entry and recaptures the mouse. |
| Start menu | Esc quits the application | Root menu; right-click is intentionally inert. |
| Tutorial | F1 skip | Non-modal card; never blocks the pointer or movement. |
The session smoke now covers menu → Settings → Cancel → menu, Help closing on
right-click, and Settings cancel from pause leaving the guard unfrozen.
## Remaining audit work
- Player-facing labels are now routed through `content/strings.en.json`; numeric