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
|
|
@ -97,7 +97,8 @@ public sealed class ToolbarController : IItemListDragHandler, IRetainedPanelCont
|
|||
uint[]? emptyDigits,
|
||||
ItemInteractionController? itemInteraction = null,
|
||||
Action<uint, uint>? sendAddShortcut = null,
|
||||
Action<uint>? sendRemoveShortcut = null)
|
||||
Action<uint>? sendRemoveShortcut = null,
|
||||
Action? toggleCombat = null)
|
||||
{
|
||||
_repo = repo;
|
||||
_combatState = combatState;
|
||||
|
|
@ -128,8 +129,16 @@ public sealed class ToolbarController : IItemListDragHandler, IRetainedPanelCont
|
|||
}
|
||||
|
||||
// Cache the four mutually-exclusive combat-mode indicator elements.
|
||||
// Retail gmToolbarUI::ListenToElementMessage @ 0x004BEE90 handles
|
||||
// Click (message 1) from ANY id 0x10000192..0x10000195 by calling
|
||||
// ClientCombatSystem::ToggleCombatMode. Exactly one is visible, but all
|
||||
// four retain the same command binding as stance changes swap the art.
|
||||
for (int i = 0; i < CombatIndicatorIds.Length; i++)
|
||||
{
|
||||
_combatIndicators[i] = layout.FindElement(CombatIndicatorIds[i]);
|
||||
if (_combatIndicators[i] is UiButton button)
|
||||
button.OnClick = toggleCombat;
|
||||
}
|
||||
|
||||
_characterButton = layout.FindElement(CharacterButtonId) as UiButton;
|
||||
_inventoryButton = layout.FindElement(InventoryButtonId) as UiButton;
|
||||
|
|
@ -223,11 +232,12 @@ public sealed class ToolbarController : IItemListDragHandler, IRetainedPanelCont
|
|||
uint[]? emptyDigits = null,
|
||||
ItemInteractionController? itemInteraction = null,
|
||||
Action<uint, uint>? sendAddShortcut = null,
|
||||
Action<uint>? sendRemoveShortcut = null)
|
||||
Action<uint>? sendRemoveShortcut = null,
|
||||
Action? toggleCombat = null)
|
||||
{
|
||||
var c = new ToolbarController(layout, repo, shortcuts, iconIds, useItem, combatState,
|
||||
peaceDigits, warDigits, emptyDigits, itemInteraction,
|
||||
sendAddShortcut, sendRemoveShortcut);
|
||||
sendAddShortcut, sendRemoveShortcut, toggleCombat);
|
||||
c.Populate();
|
||||
return c;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue