feat(ui): finish retail toolbar controls

Discover all seven panel launchers from their DAT panel-id attributes, route mounted panels through event-driven retained window state, and ghost unavailable panels. Port Use and Examine selection/target behavior with exact Appraise dispatch and retail cursor modes.

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-11 12:11:53 +02:00
parent 21fefce0e0
commit d3d1c895a0
19 changed files with 478 additions and 72 deletions

View file

@ -201,6 +201,31 @@ public sealed class RetailWindowManagerTests
Assert.Equal(1, controller.DisposeCount);
}
[Fact]
public void VisibilityEvent_tracksEveryRegisteredWindowTransition()
{
var root = new UiRoot { Width = 800, Height = 600 };
var inventory = new UiPanel { Width = 100, Height = 100 };
root.AddChild(inventory);
root.RegisterWindow("inventory", inventory);
var transitions = new List<(string Name, bool Visible)>();
root.WindowManager.WindowVisibilityChanged +=
(name, visible) => transitions.Add((name, visible));
Assert.True(root.HideWindow("inventory"));
Assert.True(root.ShowWindow("inventory"));
Assert.False(root.ToggleWindow("inventory"));
Assert.Equal(
new[]
{
("inventory", false),
("inventory", true),
("inventory", false),
},
transitions);
}
private sealed class RecordingController : IRetainedPanelController
{
public int ShownCount { get; private set; }