Mounts retail's Options panel (LayoutDesc 0x2100002B resolved through host 0x2100006E slot 0x1000018D, gmPanelUI key 10) via the same catalog-import pattern CharacterController already validates, registered through RetailPanelUiController so it shares retail's "one active gmPanelUI child" mutual exclusion with every other sibling panel for free. F11 and the toolbar's options button (0x1000019B, already authoring panel id 10) both now open it; the close button fires the same ToggleOptionsPanel action. OptionPageModel (OptionPage/BoolOptionRow) ports retail's exact Apply/Reset/Defaults/visibility semantics from UIOption_Checkbox/PlayerOptionPage — LED clicks apply live immediately, Apply commits every row unconditionally + flushes the batched blob, Reset reverts only Changed rows, Defaults restores without committing, and tab-switch/window-hide revert uncommitted edits. Wired for all four tabs; this slice registers real rows on none of them (Gameplay authentically has none — a pure button list). UiTabPanel gains an ActivePageChanged event so the page model can hook every tab transition, including the initial default-tab activation. The seven Gameplay-tab buttons: Exit Game reuses the existing graceful window-close path; Exit to Character Selection gets retail's confirmation dialog and byte-verified mid-air refusal but still behaves as Exit Game (AD-74 — no pre-world character-select flow exists); Configure Keyboard and In-Game Help Files are inert this slice (AD-76 for Help — the plugin retail depends on doesn't exist); Urgent Assistance/Report Abuse short-circuit to their own byte-verified failure text through the interface-text seam instead of ShellExecute against a dead URL (AD-75); Use Mouse Turning Settings runs the pure MouseTurningSettingsMacro port, persisting five new CameraTurningSettings preferences and sending PlayerOption.UseMouseTurning — TS-74 records that acdream has no persistent mouse-turning camera mode for the bit to drive yet. Full Release suite: 12,918 passed / 4 skipped / 0 failed (baseline 12,871/4/0 — only new tests added). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
49 lines
1.9 KiB
C#
49 lines
1.9 KiB
C#
using AcDream.App.UI;
|
|
|
|
namespace AcDream.App.Tests.UI;
|
|
|
|
/// <summary>
|
|
/// Campaign OP slice OP3: pins the Options panel's entry in
|
|
/// <see cref="RetailPanelCatalog"/> — the data the toolbar's ALREADY-GENERIC
|
|
/// panel-button mechanism (<c>ToolbarController.PanelButtonIds</c> already
|
|
/// includes <c>0x1000019B</c>, byte-verified authored panel id 10 —
|
|
/// <c>tests/AcDream.App.Tests/UI/Layout/ToolbarControllerTests.cs</c>'s own
|
|
/// <c>PanelButtons</c> fixture at <c>(0x1000019Bu, 10u)</c>) reads to route
|
|
/// the toolbar Options button and <c>RetailUiRuntime.OnWindowVisibilityChanged</c>
|
|
/// to the retail Options window. No new toolbar wiring was needed — only
|
|
/// this catalog entry, which the existing generic mechanism (
|
|
/// <c>RetailUiRuntime.BindToolbarPanelButtons</c>,
|
|
/// <c>RetailPanelUiController</c>) picks up automatically.
|
|
/// </summary>
|
|
public sealed class RetailPanelCatalogTests
|
|
{
|
|
[Fact]
|
|
public void Options_PanelId_Is10_MatchingTheToolbarButtonsAuthoredProperty()
|
|
=> Assert.Equal(10u, RetailPanelCatalog.Options);
|
|
|
|
[Fact]
|
|
public void Options_ResolvesToTheOptionsWindowName()
|
|
{
|
|
Assert.True(RetailPanelCatalog.TryGetWindowName(RetailPanelCatalog.Options, out string name));
|
|
Assert.Equal(WindowNames.Options, name);
|
|
}
|
|
|
|
[Fact]
|
|
public void OptionsWindowName_ResolvesBackToThePanelId()
|
|
{
|
|
Assert.True(RetailPanelCatalog.TryGetPanelId(WindowNames.Options, out uint panelId));
|
|
Assert.Equal(RetailPanelCatalog.Options, panelId);
|
|
}
|
|
|
|
[Fact]
|
|
public void Options_IsListedInMountedPanels()
|
|
=> Assert.Contains(
|
|
(RetailPanelCatalog.Options, WindowNames.Options),
|
|
RetailPanelCatalog.MountedPanels);
|
|
|
|
[Fact]
|
|
public void Options_IsListedInToolbarPanels()
|
|
=> Assert.Contains(
|
|
(RetailPanelCatalog.Options, WindowNames.Options),
|
|
RetailPanelCatalog.ToolbarPanels);
|
|
}
|