fix(combat): preserve authored meter child geometry
Carry the consumed dark-range child's own retail edge policy into the procedural scrollbar, widening it to the authored post-reflow interval without covering the rendered labels. Restore the bright layer to live attack-charge feedback across the full bar from the left. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
f8c174d707
commit
e671b8a5c4
10 changed files with 66 additions and 105 deletions
|
|
@ -110,23 +110,7 @@ public static class DatWidgetFactory
|
|||
// design parent and intentionally remain on the compatibility path until a
|
||||
// window mount assigns its own outer-frame policy.
|
||||
if (info.HasOriginalParentSize)
|
||||
{
|
||||
e.LayoutPolicy = new UiLayoutPolicy(
|
||||
info.Left,
|
||||
info.Top,
|
||||
info.Right,
|
||||
info.Bottom,
|
||||
UiPixelRect.FromPositionAndSize(
|
||||
(int)info.X,
|
||||
(int)info.Y,
|
||||
(int)info.Width,
|
||||
(int)info.Height),
|
||||
UiPixelRect.FromPositionAndSize(
|
||||
0,
|
||||
0,
|
||||
(int)info.OriginalParentWidth,
|
||||
(int)info.OriginalParentHeight));
|
||||
}
|
||||
e.LayoutPolicy = CreateLayoutPolicy(info);
|
||||
|
||||
return e;
|
||||
}
|
||||
|
|
@ -186,6 +170,9 @@ public static class DatWidgetFactory
|
|||
bar.ScalarRangeSprite = scalarRange is null
|
||||
? 0u
|
||||
: DefaultImage(scalarRange);
|
||||
bar.ScalarRangeLayoutPolicy = scalarRange is null
|
||||
? null
|
||||
: CreateLayoutPolicy(scalarRange);
|
||||
// UIElement_Meter::UIElement_Meter @ 0x0046F4C0 defaults direction
|
||||
// 1; DrawChildren @ 0x0046FBD0 clips that direction left-to-right.
|
||||
// Direction 3 is the horizontal reverse. Read authored attribute
|
||||
|
|
@ -221,6 +208,26 @@ public static class DatWidgetFactory
|
|||
return bar;
|
||||
}
|
||||
|
||||
private static UiLayoutPolicy? CreateLayoutPolicy(ElementInfo info)
|
||||
{
|
||||
if (!info.HasOriginalParentSize) return null;
|
||||
return new UiLayoutPolicy(
|
||||
info.Left,
|
||||
info.Top,
|
||||
info.Right,
|
||||
info.Bottom,
|
||||
UiPixelRect.FromPositionAndSize(
|
||||
(int)info.X,
|
||||
(int)info.Y,
|
||||
(int)info.Width,
|
||||
(int)info.Height),
|
||||
UiPixelRect.FromPositionAndSize(
|
||||
0,
|
||||
0,
|
||||
(int)info.OriginalParentWidth,
|
||||
(int)info.OriginalParentHeight));
|
||||
}
|
||||
|
||||
private static uint ReferencedElementId(ElementInfo info, uint propertyId)
|
||||
{
|
||||
if (!info.TryGetEffectiveProperty(propertyId, out var property))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue