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
|
|
@ -5,18 +5,28 @@ internal static class RetailCursorCatalog
|
|||
{
|
||||
public const uint CursorEnumTable = 6;
|
||||
|
||||
// ClientUISystem::UpdateCursorState (0x00564630):
|
||||
// TARGET_MODE_USE_TARGET -> enum 0x27 when no SmartBox target is found,
|
||||
// enum 0x28 when ItemHolder::IsTargetCompatibleWithTargetingObject returns true,
|
||||
// enum 0x29 when it returns false. UIElementManager::SetCursor is called
|
||||
// with hotspot (14,14) for all three.
|
||||
public static bool TryGetGlobalCursor(CursorFeedbackKind kind, out RetailCursorSpec spec)
|
||||
// Complete reachable ClientUISystem::UpdateCursorState (0x00564630)
|
||||
// catalog. Enum values 0x07..0x09 exist in the DAT but are not selected by
|
||||
// this method, so no semantics are invented for them here.
|
||||
public static bool TryGetGlobalCursor(RetailGlobalCursorKind kind, out RetailCursorSpec spec)
|
||||
{
|
||||
spec = kind switch
|
||||
{
|
||||
CursorFeedbackKind.TargetPending => new RetailCursorSpec(0x27u, 14, 14),
|
||||
CursorFeedbackKind.TargetValid => new RetailCursorSpec(0x28u, 14, 14),
|
||||
CursorFeedbackKind.TargetInvalid => new RetailCursorSpec(0x29u, 14, 14),
|
||||
RetailGlobalCursorKind.Default => new RetailCursorSpec(0x01u, 0, 0),
|
||||
RetailGlobalCursorKind.DefaultFound => new RetailCursorSpec(0x02u, 0, 0),
|
||||
RetailGlobalCursorKind.MeleeOrMissile => new RetailCursorSpec(0x03u, 0, 0),
|
||||
RetailGlobalCursorKind.MeleeOrMissileFound => new RetailCursorSpec(0x04u, 0, 0),
|
||||
RetailGlobalCursorKind.Magic => new RetailCursorSpec(0x05u, 0, 0),
|
||||
RetailGlobalCursorKind.MagicFound => new RetailCursorSpec(0x06u, 0, 0),
|
||||
RetailGlobalCursorKind.Examine => new RetailCursorSpec(0x0Au, 0, 0),
|
||||
RetailGlobalCursorKind.ExamineFound => new RetailCursorSpec(0x0Bu, 0, 0),
|
||||
RetailGlobalCursorKind.Use => new RetailCursorSpec(0x0Cu, 14, 14),
|
||||
RetailGlobalCursorKind.UseFound => new RetailCursorSpec(0x0Du, 14, 14),
|
||||
RetailGlobalCursorKind.Busy => new RetailCursorSpec(0x0Eu, 0, 0),
|
||||
RetailGlobalCursorKind.BusyFound => new RetailCursorSpec(0x0Fu, 0, 0),
|
||||
RetailGlobalCursorKind.TargetPending => new RetailCursorSpec(0x27u, 14, 14),
|
||||
RetailGlobalCursorKind.TargetValid => new RetailCursorSpec(0x28u, 14, 14),
|
||||
RetailGlobalCursorKind.TargetInvalid => new RetailCursorSpec(0x29u, 14, 14),
|
||||
_ => default,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue