fix(chargen): Campaign CC gate round 1 re-test 3 — R4-1..R4-4

Four visual residuals from the lead's own live-client captures of
1.0.2-cc.m, all root-caused via decomp + live-DAT evidence:

- R4-1: Skills credits value overlapped mid-caption again. Root cause
  was a missing UiLayoutPolicy raw-edge reflow on UiButton's value-child
  rect (the child is base-inherited across four sibling buttons of
  differing widths, so its baked-in OriginalParentWidth diverges from
  the actual 231px-wide Skills credits button) plus an HJustify.Right
  value child mapped to Center instead of a real far-edge Right.
- R4-2: the single-sprite scrollbar thumb tiled (GL_REPEAT) instead of
  drawing once — DrawTiled was reused for a small fixed marker graphic
  whose native size is far smaller than the track-proportional thumb
  rect. New DrawThumbMarker draws exactly one native-size instance.
- R4-3: the skills info-box formula line clipped past the surrounding
  gold frame's own authored bottom edge (the pane's own raw box is 20px
  taller than the frame that visually contains it) — clamp the pane's
  Height to the frame's bottom (register AD-105, since retail's
  ShowSkillsText has no code relationship to the frame to cite).
- R4-4: the Appearance help text started mid-sentence — the box was
  never touched by its page controller, so it kept UiText's chat-style
  PreserveEndOnLayout=true default; the scroll model's wasAtEnd check is
  vacuously true on its first-ever overflow transition, pinning the
  first render to the bottom. Set PreserveEndOnLayout=false (a static
  top-oriented report, not a transcript) and wired the box's own nested
  authored scrollbar, never wired before.

App suite live-DAT env 5372/3 -> 5379/3 (+7, zero regressions). Runtime
1735/0 unchanged. Full solution 14585/4 skips/1 failure (the documented
Core.Net NakEmission full-solution-only flake, confirmed standalone-pass).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-16 19:05:23 +02:00
parent 28704db4bf
commit e6acb800cc
11 changed files with 678 additions and 12 deletions

View file

@ -144,6 +144,26 @@ internal sealed class CharacterCreationAppearancePage : IDisposable
internal const uint ShadeScrollId = 0x10000321u;
internal const uint ViewportId = 0x100003BBu;
/// <summary>
/// R4-4 (Campaign CC gate round 1 re-test 3): the framed instructions
/// box (the SAME gold corner/edge sprite family the Skills info-box
/// frame uses, <c>0x100002de-e3</c>/<c>0x100000e8</c>/<c>0xea</c> —
/// live-DAT-confirmed identical children). Its own <c>P0x17</c> caption
/// is the FULL static help paragraph (no <c>gmCGAppearancePage</c>
/// runtime composition exists for it — unlike Town/Summary's
/// <c>SetTownString</c>/<c>SetHowToText</c>, this text is purely
/// DAT-authored, confirmed by the absence of any matching function in
/// the named decomp).
/// </summary>
internal const uint HelpTextId = 0x100003ABu;
/// <summary>The help box's own NESTED scrollbar child (live-DAT-
/// confirmed a direct child of <see cref="HelpTextId"/>, the SAME
/// structural id/nesting shape as
/// <c>CharacterCreationSummaryPage.HowToScrollRelativeId</c>'s own
/// how-to box scrollbar).</summary>
private const uint HelpScrollRelativeId = 0x100002E7u;
/// <summary>Retail's nine <c>SetColor(0..8)</c> swatch buttons, in
/// index order — verbatim off <c>ListenToElementMessage</c>'s cases
/// <c>5</c>-<c>0xd</c> (<c>elementId - 0x1000030a</c>).</summary>
@ -202,6 +222,7 @@ internal sealed class CharacterCreationAppearancePage : IDisposable
private readonly UiButton? _rotateCounterClockwise;
private readonly UiButton? _zoomIn;
private readonly UiButton? _zoomOut;
private readonly UiText? _helpText;
/// <summary>The gradient disc (<c>0x1000030e</c>) — Type 3 in the
/// authored dat, so <see cref="UiDatElement"/> (not the base
@ -354,6 +375,39 @@ internal sealed class CharacterCreationAppearancePage : IDisposable
_zoomIn?.TrySetRetailState(UiButtonStateMachine.Normal);
};
// R4-4 (Campaign CC gate round 1 re-test 3): the help box's static
// paragraph starts mid-sentence because this port never touched
// this element at all — it built through the plain DatWidgetFactory
// import path with UiText's own chat-style default
// (PreserveEndOnLayout=true, "keep a view that is already at the
// end pinned there" — see that property's own doc: "Chat uses the
// default; top-oriented reports such as Character Information
// disable it"). This box's content overflows its own view (a full
// multi-paragraph instructions block in a 292px-tall frame), and
// UiScrollable.SetExtents's own wasAtEnd check is vacuously true
// the very first time a Scroll model transitions from its
// zero-initialized state (ContentHeight=0/ViewHeight=0/ScrollY=0 ->
// MaxScroll=0 -> AtEnd=(0>=0)=true) to real overflowing content —
// with PreserveEndOnLayout still true, that spuriously pins the
// FIRST-EVER render to the bottom, hiding the opening paragraph
// exactly as reported ("right arrows next to the article of
// clothing..." is mid-way through the third paragraph, not the
// first). This is a static instructions box, not a chat transcript
// — the SAME top-oriented-report shape PreserveEndOnLayout's own
// doc already carves out. Also wires the box's own nested authored
// scrollbar (property 0x72, live-DAT-confirmed a direct child) —
// NEVER wired by this page before — so a user can still reach the
// rest of the text if it doesn't fully fit, the SAME
// scrollbar.Model = text.Scroll linkage
// CharacterCreationSummaryPage's how-to box already uses.
_helpText = Find<UiText>(pageRoot, HelpTextId);
if (_helpText is not null)
{
_helpText.PreserveEndOnLayout = false;
if (Find<UiScrollbar>(_helpText, HelpScrollRelativeId) is { } helpScroll)
helpScroll.Model = _helpText.Scroll;
}
ApplyChoiceVisibility();
}