fix: jump-bar 'Height' right-aligned - per-STATE justification (user
gate; the DAT authors it) The raw-property probe settles it exactly as the user reported: the powerbar caption's mode STATES author their OWN justification (0x14 Enum=0x3 = Right on JumpMode/MeleeMode/MissileMode) while the element default stays centered. ElementInfo.HJustify only ever read the effective DEFAULT state, so the earlier "authored Center" conclusion measured the wrong state. The meter's absorbed state-label entry now carries the state's own authored alignment (state 0x14 wins, element-level HJustify as the fallback, ElementReader's same enum mapping), and the caption draw aligns accordingly - 'Height' sits at the bar's right edge, retail's placement. Live vitals labels keep their centered draw. App suite 4,987/3 skips. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
adf8335675
commit
88cdfdc3c7
4 changed files with 79 additions and 22 deletions
|
|
@ -755,6 +755,13 @@ public class DatWidgetFactoryTests
|
|||
Kind = UiPropertyKind.StringInfo,
|
||||
StringInfoValue = new UiStringInfoValue(0, 1, 2, 0, 1, 0),
|
||||
};
|
||||
// The mode state's own justification (0x14=0x3 Right — the powerbar
|
||||
// modes all author it; the element default stays centered).
|
||||
jumpText.Properties.Values[0x14u] = new UiPropertyValue
|
||||
{
|
||||
Kind = UiPropertyKind.Enum,
|
||||
UnsignedValue = 0x3u,
|
||||
};
|
||||
caption.States[0x10000042u] = jumpText;
|
||||
meter.Children.Add(caption);
|
||||
|
||||
|
|
@ -764,6 +771,7 @@ public class DatWidgetFactoryTests
|
|||
Assert.Null(m.ActiveStateLabel);
|
||||
Assert.True(m.TrySetRetailState(0x10000042u));
|
||||
Assert.Equal("Height", m.ActiveStateLabel);
|
||||
Assert.Equal(UiMeterLabelAlign.Right, m.ActiveStateLabelAlign);
|
||||
Assert.Equal(0x06001354u, m.FrontTile);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,9 +67,15 @@ public sealed class PowerbarLayoutProbeTests
|
|||
text = strings.Resolve(p.StringInfoValue) ?? "<unresolved>";
|
||||
text = $" text='{text}'";
|
||||
}
|
||||
string properties = string.Join(
|
||||
" ",
|
||||
state.Properties.Values
|
||||
.OrderBy(static pair => pair.Key)
|
||||
.Select(static pair =>
|
||||
$"0x{pair.Key:X2}:{pair.Value.Kind}=0x{pair.Value.UnsignedValue:X}"));
|
||||
Console.WriteLine(
|
||||
$"[pbprobe] {indent} state 0x{stateId:X8} '{state.Name}'"
|
||||
+ $" passToChildren={state.PassToChildren}{text}");
|
||||
+ $" passToChildren={state.PassToChildren}{text} props[{properties}]");
|
||||
}
|
||||
foreach (ElementInfo child in e.Children)
|
||||
DumpElement(strings, child, depth + 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue