Create AGENTS.md as a thin bridge to CLAUDE.md, fix isolated dat-layout previews by normalizing panel roots to the studio canvas, add a --mockup mode that mounts production-backed UI windows into one UiHost, and thread the per-element dat-font resolver through GameWindow's live imports. Verified with dotnet test and headless studio screenshots for inventory and the mockup desktop.
This commit is contained in:
parent
ca94b479bf
commit
9444a328fa
8 changed files with 405 additions and 44 deletions
39
tests/AcDream.App.Tests/Studio/StudioWindowTests.cs
Normal file
39
tests/AcDream.App.Tests/Studio/StudioWindowTests.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using AcDream.App.Studio;
|
||||
using AcDream.App.UI;
|
||||
|
||||
namespace AcDream.App.Tests.Studio;
|
||||
|
||||
public class StudioWindowTests
|
||||
{
|
||||
[Fact]
|
||||
public void ParseMockup_doesNotDefaultToSinglePanelLayout()
|
||||
{
|
||||
var opts = StudioOptions.Parse(new[] { @"C:\fake-dats", "--mockup" });
|
||||
|
||||
Assert.True(opts.Mockup);
|
||||
Assert.Null(opts.LayoutId);
|
||||
Assert.Null(opts.DumpSlug);
|
||||
Assert.Null(opts.MarkupPath);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void NormalizeSinglePanelRoot_movesDatPanelToCanvasOrigin()
|
||||
{
|
||||
var root = new UiPanel
|
||||
{
|
||||
Left = 500f,
|
||||
Top = 138f,
|
||||
Width = 300f,
|
||||
Height = 362f,
|
||||
Anchors = AnchorEdges.Left | AnchorEdges.Top | AnchorEdges.Right,
|
||||
};
|
||||
|
||||
StudioWindow.NormalizeSinglePanelRoot(root);
|
||||
|
||||
Assert.Equal(0f, root.Left);
|
||||
Assert.Equal(0f, root.Top);
|
||||
Assert.Equal(300f, root.Width);
|
||||
Assert.Equal(362f, root.Height);
|
||||
Assert.Equal(AnchorEdges.None, root.Anchors);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue