fix(ui): keep spellbook tab captions above chrome

This commit is contained in:
Erik 2026-07-15 17:02:14 +02:00
parent c918ccea06
commit 16eb4844c1
4 changed files with 91 additions and 1 deletions

View file

@ -202,6 +202,9 @@ The two top-level tabs are not `UIElement_Button` instances. They resolve from
base `0x1000043A` as `UIElement_Text` (type 12), with state 11 `Closed` and
state 12 `Open`. Both states set `PassToChildren`; the three child chrome
elements carry the left/center/right Closed/Open RenderSurface media.
Their direct string property `0x17` resolves through the installed string
tables to `Spellbook` (string id `49867858`) and `Components` (string id
`79360818`).
Retail state and text construction used by these tabs:
@ -227,8 +230,21 @@ UIElement::SetState @ 0x00464E70
child.SetState(stateId)
diff old/new effective properties
call OnSetAttribute for changed properties
Retained rendering reduction:
draw the UIElement_Text background
draw its three stateful chrome children
draw the authored glyph content as the parent's foreground
```
Retail `UIElement_Text::DrawSelf @ 0x00467AA0` owns the glyphs while the child
regions own the state chrome. acdream's sprites and DAT glyphs share one
submission-ordered batch, so submitting the glyphs in the parent's foreground
pass preserves that same visible composition; submitting the entire parent
before its retained children lets the center chrome overpaint the caption.
This rule is derived structurally from `PassToChildren`, not from the two
spellbook element ids.
The Magic-combat favorite tab captions are authored text (`I` through `VIII`)
and intentionally omit property `0x20`. Their small rectangles still render
because retail begins with zero text margins. A generic four-pixel inset on