feat(D.2b): per-window resize-axis lock; vitals window is X-only (retail)
Add ResizeX/ResizeY bool properties to UiElement (both true by default). HitEdges() in UiRoot masks out locked axes after edge detection, so a locked edge falls through to window-move behaviour — matching retail, where the vitals bar height is fixed and only widens. MarkupDocument.Build() parses an optional resize="x|y|both|none" attribute on <panel>; vitals.xml gets resize="x" to enforce the horizontal-only constraint in all instances of the panel. Two new tests: HitEdges_RespectsResizeAxisLock (UiRootInputTests) and Build_ResizeAttrX_SetsHorizontalOnly (MarkupDocumentTests). 11/11 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0500646f08
commit
af91b8432a
6 changed files with 35 additions and 1 deletions
|
|
@ -542,6 +542,8 @@ public sealed class UiRoot : UiElement
|
|||
if (System.Math.Abs(x - r) <= grip) e |= ResizeEdges.Right;
|
||||
if (System.Math.Abs(y - t) <= grip) e |= ResizeEdges.Top;
|
||||
if (System.Math.Abs(y - b) <= grip) e |= ResizeEdges.Bottom;
|
||||
if (!w.ResizeX) e &= ~(ResizeEdges.Left | ResizeEdges.Right);
|
||||
if (!w.ResizeY) e &= ~(ResizeEdges.Top | ResizeEdges.Bottom);
|
||||
return e;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue