fix(D.2b): Attributes tab — fill panel height, center row icons, footer at bottom
Root cause: the sub-layout 0x2100002C (design H=337px) mounted into tab slot 0x1000022B (H=575px) via ShouldMountBaseChildren. ElementReader.Merge takes the derived (sub-layout) H=337 as canonical, so the background element's first ApplyAnchor call captured _amB=238 and the list box captured _amB=65 — both stayed at their 337px-parent sizes even though the slot is 575px. Fix: CascadeHeight in LayoutImporter.Resolve mirrors retail's UIElement::UpdateForParentSizeChange. When ShouldMountBaseChildren fires and the slot is taller than the base design, every full-stretch background child has its height cascaded: Top+Bottom anchors → stretch, Bottom-only → pin-to-bottom, Top-only/None → unchanged. This propagates the correct bottom margins through the entire subtree before the first render frame. Layout result (confirmed via headless screenshot): - List box grows from 160px → 398px (9 rows × 44px ≈ 396px) - Footer elements move from abs Y≈307 → abs Y≈545 (matching retail dump) - Separator moves to abs Y≈535 Row constants updated: RowHeight 44px, IconSize 24px, RowPadX 4px, IconGap 6px. Footer State-A text corrected per spec: title="Select an Attribute to Improve", line-1 label="Skill Credits Available:", line-1 value=SkillCredits (96), line-2 label="Unassigned Experience:", line-2 value=UnassignedXp (formatted N0). CharacterSheet.UnassignedXp (long, retail InqInt64(2)) added. SampleData.SampleCharacter().UnassignedXp = 87_757_321_741L. 5 footer tests renamed + assertions updated; SampleCharacter_UnassignedXp_IsSet added. 639 tests green. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
902160098a
commit
eccacc59de
6 changed files with 178 additions and 50 deletions
|
|
@ -94,10 +94,17 @@ public sealed class CharacterSheet
|
|||
/// <summary>
|
||||
/// Available (unspent) skill credits shown in the Attributes tab footer State-A.
|
||||
/// Retail InqInt(0x18) — gmStatManagementUI::DisplayDefaultFooter (0x0049cde0).
|
||||
/// Element 0x10000245 (footer line-2 value).
|
||||
/// Element 0x10000243 (footer line-1 value in the studio's 3-line layout).
|
||||
/// </summary>
|
||||
public int SkillCredits { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Unassigned (banked) experience points.
|
||||
/// Retail InqInt64(2) — shown in footer line-2 in State-A display.
|
||||
/// Element 0x10000245 (footer line-2 value).
|
||||
/// </summary>
|
||||
public long UnassignedXp { get; init; }
|
||||
|
||||
// ── Augmentations (UpdateAugmentations 0x004b9000) ─────────────────────
|
||||
// Retail InqInt(0x162) = AugmentationStat; string-switch 1..0xb.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue