fix(ui): retail tooltip rendering — formula-first compose and the two-pass sizing every tooltip was missing
Two corrections from the owner's retail-render oracle at the CA5 re-check, both against readings the TS-85 register row had recorded as settled: Compose (skill tooltips): retail is formula + newline + description — GetTooltip @0x004f1fe0's operator+ has the InqSkillFormula output as the LEFT operand; the old '"\n" + formula, no separator' reading had the operand order backwards and produced a leading blank line with the formula and description glued on one line. A formula-less skill (Salvaging) shows the bare description, matching the failed-InqSkillFormula branch. Sizing (ALL tooltips, per the owner's direction): retail sizes a tooltip in TWO passes (StartTooltip @0x0045DE90) — measure-wrap at the max width, resize the root through the authored ResizeTo clamps, then RecalculateGlyphList RE-WRAPS the text at its final clamped width and a second resize grows the root's HEIGHT for the extra lines. The branch the register called 'a structural no-op' IS that second pass; without it a description longer than the clamped popup stayed one clipped line, where retail shows three. ApplyTooltipText now ports the full chain, so every tooltip surface (items, options rows, character panel, world hover, map) wraps and grows exactly as retail. Pinned by BuildTooltip_FormulaFirstThenNewlineThenDescription, BuildTooltip_FormulaLessSkillShowsBareDescription, and LongTooltip_RewrapsAtTheClampedPopupWidth_AndGrowsHeightForTheExtraLines. TS-85 carries both dated corrections. Owner visual re-check owed: skill tooltip shows formula on line one, description below, long descriptions wrapping to three-plus lines inside the parchment. Full hermetic suite 15,332 passed / 0 failed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
51a7c99b94
commit
1e8596a440
5 changed files with 174 additions and 18 deletions
|
|
@ -186,12 +186,19 @@ internal static class RetailSkillFormula
|
|||
/// <summary>
|
||||
/// Retail <c>SkillInfoRegion::GetTooltip @ 0x004f1fe0</c>, called once
|
||||
/// from <c>SkillInfoRegion::SkillInfoRegion @ 0x004f2140</c>'s
|
||||
/// <c>UIElement::SetTooltip</c> at 0x004f222f. Composition is exactly
|
||||
/// <c>"\n" + formula + description</c> — retail concatenates the
|
||||
/// description directly onto the formula line with NO separator between
|
||||
/// them (ported verbatim, not "fixed": <c>append_n_chars</c> runs
|
||||
/// immediately after the formula assignment with no intervening
|
||||
/// literal). <c>SkillSystem::InqSkillDescription @ 0x005c8770</c> reads
|
||||
/// <c>UIElement::SetTooltip</c> at 0x004f222f. Composition is
|
||||
/// <c>formula + "\n" + description</c> — CORRECTED 2026-08-24 at the
|
||||
/// CA5 gate: the original Batch-B reading ("\n" + formula, no
|
||||
/// separator) had the <c>operator+</c> operand order backwards
|
||||
/// (<c>PVar3 = operator+(&local_c, ...)</c> — <c>local_c</c>, the
|
||||
/// InqSkillFormula output, is the LEFT operand; the "\n" literal is the
|
||||
/// right), and the owner's retail-client render confirms: formula on
|
||||
/// its own first line, description below (wrapping to further lines
|
||||
/// when the DAT text is long). A formula-less skill (Salvaging) shows
|
||||
/// the bare description with no leading break, matching retail's
|
||||
/// failed-<c>InqSkillFormula</c> branch, which appends the description
|
||||
/// to the still-empty output.
|
||||
/// <c>SkillSystem::InqSkillDescription @ 0x005c8770</c> reads
|
||||
/// <c>SkillBase._description</c> — the same DAT field
|
||||
/// <see cref="DatReaderWriter.Types.SkillBase.Description"/> already
|
||||
/// exposes, so no hand-transcription was needed for the ~30+ skill
|
||||
|
|
@ -204,7 +211,7 @@ internal static class RetailSkillFormula
|
|||
|
||||
string? formula = FormatFormula(skillBase.Formula);
|
||||
string description = skillBase.Description.Value ?? string.Empty;
|
||||
string tooltip = (formula is null ? string.Empty : "\n" + formula) + description;
|
||||
string tooltip = (formula is null ? string.Empty : formula + "\n") + description;
|
||||
return tooltip.Length == 0 ? null : tooltip;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue