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
+16
@@ -70,3 +70,19 @@ clicks only hit at the unshifted position. `cUI_Button2`, `cUI_Static2`,
|
||||
`cUI_StaticText64`, `cUI_StaticText64FX` (render and event) and
|
||||
`cUI_TextLines` (render) are hooked as centred windows too; inside other
|
||||
windows they are in that window's scope already (outermost wins).
|
||||
|
||||
## Tooltips and quest dialogs (2026-10-16)
|
||||
|
||||
Quest dialogs are tooltips: `cUI_Manager::tooltipCreate` (`0x75a870`) hands
|
||||
out a panel from a pool at cUI_Manager +0x124 (`UI_WND_TOOLTIP`, created
|
||||
1024x768, flags 0x804 while hidden); the quest dialog used one at 136,306,
|
||||
752x157 (flags 0x805). Tooltips used to be drawn with the offset of the moved
|
||||
window under the cursor in every frame, and without recording an offset for
|
||||
hit tests: dialogs jumped to the 1024 frame when the cursor left the UI, and
|
||||
their clicks only hit at the unshifted position. Now a tooltip keeps the
|
||||
offset it gets when it becomes visible (the hovered window's, or the centre
|
||||
when no moved window is under the cursor: a dialog) and records it for hit
|
||||
tests. Visible dialog tooltips: `mods::hud::VisibleDialogTooltips`.
|
||||
|
||||
The standalone control hooks (buttons, texts) above turned out not to be what
|
||||
the quest dialog is made of; they stay, for top-level controls in general.
|
||||
Reference in new issue
Block a user