feat(ui): complete retail cursor state machine
Port every reachable ClientUISystem cursor branch through the production DAT enum map, preserve global-default versus widget-local event ordering, and surface the registered OS fallback. Route all four toolbar stance indicators through the same combat toggle command as the key binding, with golden DAT and transition conformance coverage. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
05f6222865
commit
6fcc510d5d
16 changed files with 535 additions and 164 deletions
|
|
@ -30,11 +30,12 @@ public class ToolbarControllerTests
|
|||
var root = new UiPanel();
|
||||
foreach (var id in Row1) AddSlot(id);
|
||||
foreach (var id in Row2) AddSlot(id);
|
||||
// Add combat indicator elements as plain UiPanels keyed by id.
|
||||
// Combat indicators are retail UiButtons; one is visible at a time,
|
||||
// and every stance-specific instance dispatches the same toggle command.
|
||||
foreach (var id in CombatIds)
|
||||
{
|
||||
var e = new UiPanel { Visible = true };
|
||||
dict[id] = e; indicators[id] = e; root.AddChild(e);
|
||||
AddButton(id);
|
||||
indicators[id] = dict[id];
|
||||
}
|
||||
AddButton(CharacterButtonId);
|
||||
AddButton(InventoryButtonId);
|
||||
|
|
@ -232,6 +233,27 @@ public class ToolbarControllerTests
|
|||
|
||||
// ── C1: combat-mode indicator tests ─────────────────────────────────────
|
||||
|
||||
[Fact]
|
||||
public void CombatIndicators_allDispatchSharedRetailToggleCommand()
|
||||
{
|
||||
var (layout, _, indicators) = FakeToolbar();
|
||||
var repo = new ClientObjectTable();
|
||||
int toggles = 0;
|
||||
|
||||
ToolbarController.Bind(
|
||||
layout,
|
||||
repo,
|
||||
() => Array.Empty<PlayerDescriptionParser.ShortcutEntry>(),
|
||||
iconIds: (_, _, _, _, _) => 0u,
|
||||
useItem: _ => { },
|
||||
toggleCombat: () => toggles++);
|
||||
|
||||
foreach (uint id in CombatIds)
|
||||
((UiButton)indicators[id]).OnClick?.Invoke();
|
||||
|
||||
Assert.Equal(CombatIds.Length, toggles);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// At bind time (default NonCombat), only the peace indicator (0x10000192) is visible;
|
||||
/// the melee/missile/magic indicators (0x10000193/4/5) are hidden.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue