From 594942f1275a412b2d9de326fdb71add48de1632 Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 24 Jun 2026 22:31:44 +0200 Subject: [PATCH] =?UTF-8?q?fix(D.2b):=20Slice=202=20=E2=80=94=20Slots=20ca?= =?UTF-8?q?ption=20white=20+=20left-aligned=20(visual=20gate)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User gate: the "Slots" toggle caption was gold (should be white) and centered (should sit at the left, before the slots). UiButton gains a LabelAlignment (Center default / Left); the paperdoll caption is set white + Left-aligned. The retail checkbox box (green-checked / circle-unchecked) + the exact pose are the two remaining pieces, done next. Build + full App suite green (596). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/AcDream.App/UI/Layout/PaperdollController.cs | 5 +++-- src/AcDream.App/UI/UiButton.cs | 13 +++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/AcDream.App/UI/Layout/PaperdollController.cs b/src/AcDream.App/UI/Layout/PaperdollController.cs index 77d5f9c4..4d454270 100644 --- a/src/AcDream.App/UI/Layout/PaperdollController.cs +++ b/src/AcDream.App/UI/Layout/PaperdollController.cs @@ -122,12 +122,13 @@ public sealed class PaperdollController : IItemListDragHandler { slotsBtn.OnClick = () => { _viewState.Toggle(); ApplyView(); }; // The dat element has no face sprite, so without a label the button is invisible. Give it a - // "Slots" caption (gold, like the chat Send button) so it's findable + clickable. + // left-aligned WHITE "Slots" caption (retail is white, not gold) so it's findable + clickable. if (datFont is not null) { slotsBtn.Label = "Slots"; slotsBtn.LabelFont = datFont; - slotsBtn.LabelColor = new System.Numerics.Vector4(1f, 0.92f, 0.72f, 1f); + slotsBtn.LabelColor = System.Numerics.Vector4.One; // white (was gold) + slotsBtn.LabelAlign = UiButton.LabelAlignment.Left; // sit at the left, before the slots } } diff --git a/src/AcDream.App/UI/UiButton.cs b/src/AcDream.App/UI/UiButton.cs index 4936ada4..440b848c 100644 --- a/src/AcDream.App/UI/UiButton.cs +++ b/src/AcDream.App/UI/UiButton.cs @@ -47,6 +47,13 @@ public sealed class UiButton : UiElement /// Label color (default white). public Vector4 LabelColor { get; set; } = Vector4.One; + /// Horizontal alignment of . Center (default) for normal buttons; + /// Left for the paperdoll "Slots" caption that sits at the left edge, before the slots. + public LabelAlignment LabelAlign { get; set; } = LabelAlignment.Center; + + /// Label horizontal alignment options. + public enum LabelAlignment { Center, Left } + /// /// Active state name, runtime-settable (e.g. Max/Min toggling Normal ↔ Minimized). /// Matches . @@ -106,8 +113,10 @@ public sealed class UiButton : UiElement if (Label is { Length: > 0 } label && LabelFont is { } lf) { - float tx = (Width - lf.MeasureWidth(label)) * 0.5f; - float ty = (Height - lf.LineHeight) * 0.5f; + float tx = LabelAlign == LabelAlignment.Left + ? 3f // small left pad (room for a future checkbox box) + : (Width - lf.MeasureWidth(label)) * 0.5f; // centered (default) + float ty = (Height - lf.LineHeight) * 0.5f; ctx.DrawStringDat(lf, label, tx, ty, LabelColor); } }