Add AnchorEdges [Flags] enum and Anchors property (default Left|Top, so all existing elements are unchanged) to UiElement. ApplyAnchor() captures the design-time margins on first call then recomputes Left/Top/Width/Height each frame; DrawSelfAndChildren drives it for every child before painting. ComputeAnchoredRect is public + static so it can be unit-tested without a running frame loop. MarkupDocument.Build gains a private Anchor() CSV parser and threads it into the <meter> initializer via the anchor= attribute. vitals.xml: remove title="Vitals" (retail vitals has no heading) and add anchor="left,top,right" to all three meter bars so they stretch when the panel is dragged wider. Two new xUnit tests in UiRootInputTests: Left+Right stretches width; Left+Top only keeps fixed size. All 19 App.Tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Plugins | ||
| Rendering | ||
| UI | ||
| AcDream.App.Tests.csproj | ||
| RuntimeOptionsRetailUiTests.cs | ||
| RuntimeOptionsTests.cs | ||