fix(ui): restore retail spell tabs and spellbook
Bind the spellbook and component-book tabs as their authored stateful text controls, propagate Closed/Open state into the retained DAT child tree, and keep authored label colors live across state changes. Match retail UIElement_Text zero-margin construction so the Magic favorite captions I through VIII are no longer clipped. Add a real portal.dat spellbook fixture plus controller, state-propagation, and text-layout regression coverage. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
parent
07be994d97
commit
ad30c37a48
15 changed files with 13492 additions and 38 deletions
|
|
@ -525,6 +525,7 @@ public static class DatWidgetFactory
|
|||
// set DatFont afterward STILL override this (backward-compat guarantee).
|
||||
DatFont = elementFont,
|
||||
};
|
||||
t.ConfigureDatState(info);
|
||||
|
||||
// Font color from dat property 0x1B (ColorBaseProperty).
|
||||
// When present, seed DefaultColor so controllers that read it don't have to hard-code colors.
|
||||
|
|
@ -534,10 +535,7 @@ public static class DatWidgetFactory
|
|||
t.DefaultColor = info.FontColor.Value;
|
||||
|
||||
if (ResolveAuthoredString(info, stringResolve) is { Length: > 0 } authored)
|
||||
{
|
||||
UiText.Line[] line = [new UiText.Line(authored, t.DefaultColor)];
|
||||
t.LinesProvider = () => line;
|
||||
}
|
||||
t.LinesProvider = () => [new UiText.Line(authored, t.DefaultColor)];
|
||||
|
||||
return t;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue