fix(ui): keep spell components in authored foreground

Install examination formula icons as the template root UIRegion image, matching retail ClearImage/SetImage behavior while retaining the authored missing-component overlay. Add the real DAT template fixture and conformance coverage.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-24 08:08:29 +02:00
parent d4ce64f56b
commit 2c3da8e153
14 changed files with 231 additions and 34 deletions

View file

@ -105,14 +105,21 @@ for each SCID in GetAppropriateSpellFormula(spell):
component = SpellComponentTable[SCID]
texture = GetSpellComponentIcon(component.iconDID)
cell = AddItemFromTemplateList(0x1000032E)
cell.icon = texture
cell.ClearImage()
cell.SetBlitMode(Blit_3Alpha)
cell.SetImage(texture)
cell.missingOverlay = !ComponentTracker.ComponentIsOwned(component.WCID)
initial floaty extent = LayoutDesc root extent = 310 x 400 pixels
restore user position/size from player UI state
```
The component icon lookup consumes the component's icon DID, not its WCID.
`SetImage` replaces the template root UIRegion's own image; retail does not add
a separate, negatively layered icon child. Template child `0x10000330` remains
the missing-component overlay. `UIRegion::DrawHere @ 0x0069FA30` draws the
root's image before its children for this template, preserving the authored
icon/overlay foreground stack. The component icon lookup consumes the
component's icon DID, not its WCID.
acdream's retained-layout persistence carries an authored-geometry revision:
when a shipped LayoutDesc extent correction invalidates an older saved size,
only width/height reset once; position, visibility, and later user resizing