Quest dialogs: stay centred, clickable, closable with Esc
- Quest dialogs are tooltips. A tooltip now keeps the offset it gets when it becomes visible (the hovered window's, or centred for dialogs) and records it for hit tests; its own event handler is shifted too. Hidden windows no longer count as hovered. - Esc closes a visible dialog the way its answer buttons do: hide, then cDialogManager::Answer with no answer (ends the input lock, nothing chosen). - Autotest can select a save game row (-Save). - Names for the UI manager, tooltip and dialog functions. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1fd89524d3
commit
a7f8496b2b
6 files changed
+165
-4
No files matched your search
+8
-2
@@ -29,5 +29,11 @@ HandleEsc is hooked: unless the ESC menu is open, every visible window of a
|
||||
table (slot, name) gets that hide command, and Esc does nothing else. If none
|
||||
is open, the game handles Esc as before.
|
||||
|
||||
Not covered: dialogs that are not one of these windows, e.g. quest dialogs
|
||||
(standalone buttons and texts in the UI manager, docs/hud.md).
|
||||
Quest dialogs are tooltips (docs/hud.md) that block all input until answered.
|
||||
A click on one of their entries (cUI_Tooltip::HandleEvent 0x6e71e2) hides the
|
||||
tooltip (0x731ee0, flag 1), calls cDialogManager::Answer (0x49a090 on
|
||||
0xaaaf00, (owner = tooltip +0x21cc, answer)) and clears 0xab5314. Answer sends
|
||||
every player hero a cEvent_creature 0x10c (ends the input lock) and passes
|
||||
answers below 100000 to the quest script (0x46bd80). Esc does the same with
|
||||
answer 0xffffffff: the dialog closes, nothing is chosen. (Hiding the tooltip
|
||||
alone left the input lock; measured with a write watch on its flags.)
|
||||
Reference in new issue
Block a user