fix(ui): render live component counts
Port retail text-surface clipping so the 15px component count field remains visible under the 16px DAT font. Cover SetStackSize decrements and final component removal while preserving desired restock values. Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
a1175e6aac
commit
0527325b25
7 changed files with 217 additions and 36 deletions
|
|
@ -360,6 +360,14 @@ UpdateComponents(change):
|
|||
row[0x1000046B].inputFilter = NumberInputFilter
|
||||
insertion++
|
||||
|
||||
SyncComponentRegionWithData(row, componentData):
|
||||
row[0x1000046A].text = componentData.numItems
|
||||
|
||||
UIElement_Text::DrawSelf(rowText, visibleSurface):
|
||||
position each glyph line using CalcJustification
|
||||
draw intersecting glyphs clipped to visibleSurface
|
||||
do not discard a line merely because its line box exceeds the surface
|
||||
|
||||
ListenToElementMessage(message):
|
||||
if selection changed:
|
||||
if selected entry is a category:
|
||||
|
|
@ -388,6 +396,12 @@ equivalent of `AddItemFromTemplateList`. Controllers bind only the live icon,
|
|||
texts, selection, and edit callbacks. They do not duplicate the row sprites,
|
||||
fonts, or geometry.
|
||||
|
||||
The owned-count child is 15 pixels high while installed font `0x40000000`
|
||||
advances 16 pixels. Retail's `UIElement_Text::DrawSelf @ 0x00467AA0` clips the
|
||||
glyph blits against the supplied visible surface, so the count remains visible.
|
||||
A retained renderer that accepts only fully contained lines suppresses this
|
||||
field and is not retail-conformant.
|
||||
|
||||
### Spellbook row, selection, filtering, dragging, and deletion
|
||||
|
||||
Named-retail anchors:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue