feat(ui): port favorite spell bar overflow
Import the retail arrow-only spell bar scrollbar from LayoutDesc, preserve authored end-button extents and HideDisabled behavior in the shared retained widget, and bind each favorite list to its sole horizontal pixel-scroll model. Match retail selection exposure for off-screen spells and pin the behavior with real-fixture conformance tests. Document the six-slice world-interaction completion program as the active pre-M4 work order. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
20e2998adb
commit
02c29e67c8
12 changed files with 582 additions and 45 deletions
|
|
@ -140,8 +140,22 @@ public static class DatWidgetFactory
|
|||
Horizontal = info.Width > info.Height,
|
||||
};
|
||||
|
||||
uint incrementId = ReferencedElementId(info, 0x77u);
|
||||
uint decrementId = ReferencedElementId(info, 0x78u);
|
||||
ElementInfo? increment = info.Children.FirstOrDefault(child => child.Id == incrementId);
|
||||
ElementInfo? decrement = info.Children.FirstOrDefault(child => child.Id == decrementId);
|
||||
bar.UpSprite = decrement is null ? 0u : DefaultImage(decrement);
|
||||
bar.DownSprite = increment is null ? 0u : DefaultImage(increment);
|
||||
if (info.TryGetEffectiveBool(0x79u, out bool hideDisabled))
|
||||
bar.HideWhenDisabled = hideDisabled;
|
||||
|
||||
if (bar.Horizontal)
|
||||
{
|
||||
if (decrement is { Width: > 0f })
|
||||
bar.DecrementButtonExtent = decrement.Width;
|
||||
if (increment is { Width: > 0f })
|
||||
bar.IncrementButtonExtent = increment.Width;
|
||||
|
||||
// Retail horizontal scrollbars use structural child ids: element 1 is
|
||||
// the thumb and element 4 is the optional child-authored track.
|
||||
ElementInfo? scalarThumb = info.Children.FirstOrDefault(child => child.Id == 1u);
|
||||
|
|
@ -193,12 +207,10 @@ public static class DatWidgetFactory
|
|||
return bar;
|
||||
}
|
||||
|
||||
uint incrementId = ReferencedElementId(info, 0x77u);
|
||||
uint decrementId = ReferencedElementId(info, 0x78u);
|
||||
ElementInfo? increment = info.Children.FirstOrDefault(child => child.Id == incrementId);
|
||||
ElementInfo? decrement = info.Children.FirstOrDefault(child => child.Id == decrementId);
|
||||
bar.UpSprite = decrement is null ? 0u : DefaultImage(decrement);
|
||||
bar.DownSprite = increment is null ? 0u : DefaultImage(increment);
|
||||
if (decrement is { Height: > 0f })
|
||||
bar.DecrementButtonExtent = decrement.Height;
|
||||
if (increment is { Height: > 0f })
|
||||
bar.IncrementButtonExtent = increment.Height;
|
||||
|
||||
ElementInfo? thumb = info.Children.FirstOrDefault(child =>
|
||||
child.Type == 1u && child.Id != incrementId && child.Id != decrementId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue