fix(ui): #145 — importer honors ZLevel so the backdrop sits behind panels
The factory mapped ZOrder from ReadOrder only, so the gmInventoryUI full-window backdrop (0x100001D0, ReadOrder 4) painted over the nested panels (ReadOrder 1-3). Wire ElementDesc.ZLevel through ElementInfo / ToInfo / Merge and fold it into ZOrder = ReadOrder - ZLevel*10000 (higher ZLevel = further back, ReadOrder the within-layer tiebreaker). Vitals (all ZLevel 0) are unchanged; chat (ZLevel 900) + toolbar (1,2) shift to their dat layering — verify visually. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d81ea11a31
commit
45a5cc5bb6
4 changed files with 56 additions and 2 deletions
|
|
@ -39,6 +39,12 @@ public sealed class ElementInfo
|
|||
/// <summary>Draw order within the parent (lower = drawn first / behind).</summary>
|
||||
public uint ReadOrder;
|
||||
|
||||
/// <summary>Layer level from the dat (<c>ElementDesc.ZLevel</c>). Higher = drawn further
|
||||
/// BACK (a full-window backdrop at ZLevel 100 sits behind ZLevel-0 panels). The factory
|
||||
/// folds it into <see cref="UiElement.ZOrder"/> so ZLevel dominates and ReadOrder is the
|
||||
/// within-layer tiebreaker. Issue #145 (vitals are all ZLevel 0, so they're unaffected).</summary>
|
||||
public uint ZLevel;
|
||||
|
||||
/// <summary>
|
||||
/// Font dat object id inherited from the base element's <c>Properties[0x1A]</c>
|
||||
/// (<c>ArrayBaseProperty → DataIdBaseProperty</c>). 0 = none / not inherited.
|
||||
|
|
@ -152,6 +158,7 @@ public static class ElementReader
|
|||
Right = derived.Right,
|
||||
Bottom = derived.Bottom,
|
||||
ReadOrder = derived.ReadOrder,
|
||||
ZLevel = derived.ZLevel != 0 ? derived.ZLevel : base_.ZLevel,
|
||||
FontDid = derived.FontDid != 0 ? derived.FontDid : base_.FontDid,
|
||||
// DefaultStateName: derived wins if set; otherwise inherit the base's default.
|
||||
DefaultStateName = !string.IsNullOrEmpty(derived.DefaultStateName) ? derived.DefaultStateName : base_.DefaultStateName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue