namespace AcDream.App.UI;
///
/// The base scrollbar skin from LayoutDesc 0x2100003E, seated the way
/// retail seats it at runtime. UIElement_Scrollbar::UpdateScrollingArea
/// @0x00470AA0 ignores the buttons' authored positions: it moves the
/// INCREMENT button (attribute 0x77) to the top/left corner
/// (MoveTo(0,0)) and the DECREMENT button (attribute 0x78) to
/// the bottom/right corner. The vertical skin (element 0x10000455)
/// designates 0x77=0x10000072 (the UP-arrow art, authored at Y=32)
/// and 0x78=0x10000071 (the DOWN-arrow art, authored at Y=0) — so
/// seating by authored Y renders both arrows upside down (the 2026-08-24
/// owner report). Each button and thumb slice authors three states:
/// Normal (red center gem / dark navy thumb), Normal_rollover (amber gem /
/// bright blue thumb), Normal_pressed (gold highlight gem / dark thumb) —
/// all live-DAT probed 2026-08-24.
///
internal static class RetailScrollbarChrome
{
// ── Vertical skin (element 0x10000455, 16 px) ────────────────────────
internal const uint Track = 0x06004C5Fu;
/// Top button = the INCREMENT designee 0x10000072 (up arrow).
internal const uint UpNormal = 0x06004C6Cu;
internal const uint UpRollover = 0x06004C6Du;
internal const uint UpPressed = 0x06004C6Eu;
/// Bottom button = the DECREMENT designee 0x10000071 (down arrow).
internal const uint DownNormal = 0x06004C69u;
internal const uint DownRollover = 0x06004C6Au;
internal const uint DownPressed = 0x06004C6Bu;
internal const uint ThumbTopNormal = 0x06004C60u;
internal const uint ThumbTopRollover = 0x06004C61u;
internal const uint ThumbTopPressed = 0x06004C62u;
internal const uint ThumbMidNormal = 0x06004C63u;
internal const uint ThumbMidRollover = 0x06004C64u;
internal const uint ThumbMidPressed = 0x06004C65u;
internal const uint ThumbBotNormal = 0x06004C66u;
internal const uint ThumbBotRollover = 0x06004C67u;
internal const uint ThumbBotPressed = 0x06004C68u;
// ── Horizontal skin (element 0x1000036D, 16 px) ──────────────────────
internal const uint HTrack = 0x06004C7Fu;
/// Left button = the INCREMENT designee 0x1000036C.
internal const uint LeftNormal = 0x06004C8Cu;
internal const uint LeftRollover = 0x06004C8Du;
internal const uint LeftPressed = 0x06004C8Eu;
/// Right button = the DECREMENT designee 0x1000036B.
internal const uint RightNormal = 0x06004C89u;
internal const uint RightRollover = 0x06004C8Au;
internal const uint RightPressed = 0x06004C8Bu;
internal const uint HThumbTopNormal = 0x06004C80u;
internal const uint HThumbTopRollover = 0x06004C81u;
internal const uint HThumbTopPressed = 0x06004C82u;
internal const uint HThumbMidNormal = 0x06004C83u;
internal const uint HThumbMidRollover = 0x06004C84u;
internal const uint HThumbMidPressed = 0x06004C85u;
internal const uint HThumbBotNormal = 0x06004C86u;
internal const uint HThumbBotRollover = 0x06004C87u;
internal const uint HThumbBotPressed = 0x06004C88u;
/// Wires the full retail vertical skin onto .
internal static void ApplyVertical(UiScrollbar bar)
{
bar.TrackSprite = Track;
bar.UpSprite = UpNormal;
bar.UpRolloverSprite = UpRollover;
bar.UpPressedSprite = UpPressed;
bar.DownSprite = DownNormal;
bar.DownRolloverSprite = DownRollover;
bar.DownPressedSprite = DownPressed;
bar.ThumbTopSprite = ThumbTopNormal;
bar.ThumbTopRolloverSprite = ThumbTopRollover;
bar.ThumbTopPressedSprite = ThumbTopPressed;
bar.ThumbSprite = ThumbMidNormal;
bar.ThumbRolloverSprite = ThumbMidRollover;
bar.ThumbPressedSprite = ThumbMidPressed;
bar.ThumbBotSprite = ThumbBotNormal;
bar.ThumbBotRolloverSprite = ThumbBotRollover;
bar.ThumbBotPressedSprite = ThumbBotPressed;
}
/// Wires the full retail horizontal skin onto .
/// The leading () slot is the LEFT edge.
internal static void ApplyHorizontal(UiScrollbar bar)
{
bar.TrackSprite = HTrack;
bar.UpSprite = LeftNormal;
bar.UpRolloverSprite = LeftRollover;
bar.UpPressedSprite = LeftPressed;
bar.DownSprite = RightNormal;
bar.DownRolloverSprite = RightRollover;
bar.DownPressedSprite = RightPressed;
bar.ThumbTopSprite = HThumbTopNormal;
bar.ThumbTopRolloverSprite = HThumbTopRollover;
bar.ThumbTopPressedSprite = HThumbTopPressed;
bar.ThumbSprite = HThumbMidNormal;
bar.ThumbRolloverSprite = HThumbMidRollover;
bar.ThumbPressedSprite = HThumbMidPressed;
bar.ThumbBotSprite = HThumbBotNormal;
bar.ThumbBotRolloverSprite = HThumbBotRollover;
bar.ThumbBotPressedSprite = HThumbBotPressed;
}
}