Port global toolbar use/select/create actions, migrate the collapsed Ctrl-number bindings, and route them through a focused retained-UI controller. Preserve shortcut aliases as aliases across inventory and paperdoll drops with retail's neutral/accept/reject drag states, preventing physical item moves such as unwielding an equipped helmet. Co-Authored-By: Codex <codex@openai.com>
282 lines
11 KiB
C#
282 lines
11 KiB
C#
namespace AcDream.UI.Abstractions.Input;
|
||
|
||
/// <summary>
|
||
/// High-level input actions. Each name matches an entry in the retail
|
||
/// <c>acclient.keymap</c> "Bindings" header (see
|
||
/// <c>docs/research/named-retail/retail-default.keymap.txt</c>). The
|
||
/// <c>Acdream*</c> entries at the bottom are extensions for current
|
||
/// debug bindings that have no retail equivalent.
|
||
///
|
||
/// <para>
|
||
/// K.1a defined the enum and K.1c flipped the bindings table to the full
|
||
/// retail preset. Runtime controllers subscribe by subsystem; actions whose
|
||
/// owning panel has not landed yet (for example <c>UseSpellSlot_*</c>) may
|
||
/// intentionally remain undispatched.
|
||
/// </para>
|
||
/// </summary>
|
||
public enum InputAction
|
||
{
|
||
/// <summary>Sentinel — no action. Reserved for "unbound".</summary>
|
||
None = 0,
|
||
|
||
// ── MovementCommands ──────────────────────────────────
|
||
/// <summary>Move forward (run by default; walk if <see cref="MovementWalkMode"/> active).</summary>
|
||
MovementForward,
|
||
/// <summary>Move backward.</summary>
|
||
MovementBackup,
|
||
/// <summary>Turn the character to the left.</summary>
|
||
MovementTurnLeft,
|
||
/// <summary>Turn the character to the right.</summary>
|
||
MovementTurnRight,
|
||
/// <summary>Strafe (sidestep) to the left.</summary>
|
||
MovementStrafeLeft,
|
||
/// <summary>Strafe (sidestep) to the right.</summary>
|
||
MovementStrafeRight,
|
||
/// <summary>Hold-modifier — toggles forward motion to walk while held (retail Shift).</summary>
|
||
MovementWalkMode,
|
||
/// <summary>Toggle autorun on/off (retail Q).</summary>
|
||
MovementRunLock,
|
||
/// <summary>Charged jump — hold to power, release to launch.</summary>
|
||
MovementJump,
|
||
/// <summary>Cancel current motion / return to ready stance.</summary>
|
||
MovementStop,
|
||
/// <summary>Ready posture / sheathe-unsheathe (retail Y).</summary>
|
||
Ready,
|
||
/// <summary>Sit posture (retail G).</summary>
|
||
Sitting,
|
||
/// <summary>Crouch posture (retail H).</summary>
|
||
Crouch,
|
||
/// <summary>Sleep posture (retail B).</summary>
|
||
Sleeping,
|
||
|
||
// ── ItemSelectionCommands ─────────────────────────────
|
||
/// <summary>Pick up the selected item.</summary>
|
||
SelectionPickUp,
|
||
/// <summary>Split a stack of the selected item.</summary>
|
||
SelectionSplitStack,
|
||
/// <summary>Cycle back to the previous selection.</summary>
|
||
SelectionPreviousSelection,
|
||
/// <summary>Closest compass-tracked item.</summary>
|
||
SelectionClosestCompassItem,
|
||
/// <summary>Previous compass-tracked item.</summary>
|
||
SelectionPreviousCompassItem,
|
||
/// <summary>Next compass-tracked item.</summary>
|
||
SelectionNextCompassItem,
|
||
/// <summary>Closest item in radius.</summary>
|
||
SelectionClosestItem,
|
||
/// <summary>Previous item in radius.</summary>
|
||
SelectionPreviousItem,
|
||
/// <summary>Next item in radius.</summary>
|
||
SelectionNextItem,
|
||
/// <summary>Closest monster.</summary>
|
||
SelectionClosestMonster,
|
||
/// <summary>Previous monster.</summary>
|
||
SelectionPreviousMonster,
|
||
/// <summary>Next monster.</summary>
|
||
SelectionNextMonster,
|
||
/// <summary>Most-recent attacker (for retaliation).</summary>
|
||
SelectionLastAttacker,
|
||
/// <summary>Closest player.</summary>
|
||
SelectionClosestPlayer,
|
||
/// <summary>Previous player.</summary>
|
||
SelectionPreviousPlayer,
|
||
/// <summary>Next player.</summary>
|
||
SelectionNextPlayer,
|
||
/// <summary>Previous fellow.</summary>
|
||
SelectionPreviousFellow,
|
||
/// <summary>Next fellow.</summary>
|
||
SelectionNextFellow,
|
||
/// <summary>Examine (Appraise) the current selection.</summary>
|
||
SelectionExamine,
|
||
|
||
// ── UICommands ────────────────────────────────────────
|
||
/// <summary>Use the selected item / interact (retail R).</summary>
|
||
UseSelected,
|
||
/// <summary>Cancel the topmost UI / clear selection / open log-out menu.</summary>
|
||
EscapeKey,
|
||
/// <summary>Log out of the game (retail Shift+Esc).</summary>
|
||
LOGOUT,
|
||
/// <summary>Toggle the help / control reference panel (retail F1).</summary>
|
||
ToggleHelp,
|
||
/// <summary>Toggle the plugin manager panel (retail F1+Shift+Ctrl).</summary>
|
||
TogglePluginManager,
|
||
/// <summary>Toggle the allegiance panel (retail F3).</summary>
|
||
ToggleAllegiancePanel,
|
||
/// <summary>Toggle the fellowship panel (retail F4).</summary>
|
||
ToggleFellowshipPanel,
|
||
/// <summary>Toggle the spellbook panel (retail F5).</summary>
|
||
ToggleSpellbookPanel,
|
||
/// <summary>Toggle the spell-components panel (retail F6).</summary>
|
||
ToggleSpellComponentsPanel,
|
||
/// <summary>Toggle the attributes panel (retail F8).</summary>
|
||
ToggleAttributesPanel,
|
||
/// <summary>Toggle the skills panel (retail F9).</summary>
|
||
ToggleSkillsPanel,
|
||
/// <summary>Toggle the world / map panel (retail F10).</summary>
|
||
ToggleWorldPanel,
|
||
/// <summary>Toggle the options / settings panel (retail F11) — opens
|
||
/// our SettingsPanel in K.3.</summary>
|
||
ToggleOptionsPanel,
|
||
/// <summary>Toggle the inventory panel (retail F12).</summary>
|
||
ToggleInventoryPanel,
|
||
/// <summary>Toggle floating chat window 1 (retail Alt+1).</summary>
|
||
ToggleFloatingChatWindow1,
|
||
/// <summary>Toggle floating chat window 2.</summary>
|
||
ToggleFloatingChatWindow2,
|
||
/// <summary>Toggle floating chat window 3.</summary>
|
||
ToggleFloatingChatWindow3,
|
||
/// <summary>Toggle floating chat window 4.</summary>
|
||
ToggleFloatingChatWindow4,
|
||
/// <summary>Capture a screenshot (retail PrintScreen).</summary>
|
||
CaptureScreenshot,
|
||
|
||
// ── QuickslotCommands ─────────────────────────────────
|
||
UseQuickSlot_1,
|
||
UseQuickSlot_2,
|
||
UseQuickSlot_3,
|
||
UseQuickSlot_4,
|
||
UseQuickSlot_5,
|
||
UseQuickSlot_6,
|
||
UseQuickSlot_7,
|
||
UseQuickSlot_8,
|
||
UseQuickSlot_9,
|
||
SelectQuickSlot_1,
|
||
SelectQuickSlot_2,
|
||
SelectQuickSlot_3,
|
||
SelectQuickSlot_4,
|
||
SelectQuickSlot_5,
|
||
SelectQuickSlot_6,
|
||
SelectQuickSlot_7,
|
||
SelectQuickSlot_8,
|
||
SelectQuickSlot_9,
|
||
UseQuickSlot_14,
|
||
UseQuickSlot_15,
|
||
UseQuickSlot_16,
|
||
UseQuickSlot_17,
|
||
UseQuickSlot_18,
|
||
/// <summary>Create a toolbar shortcut to the selected object (retail 0).</summary>
|
||
CreateShortcut,
|
||
|
||
// ── Chat ──────────────────────────────────────────────
|
||
/// <summary>Focus the chat input field (retail Tab).</summary>
|
||
ToggleChatEntry,
|
||
/// <summary>Send the current chat-input contents (retail Return).</summary>
|
||
EnterChatMode,
|
||
|
||
// ── Combat ────────────────────────────────────────────
|
||
/// <summary>Toggle combat-stance on/off (retail Grave / `).</summary>
|
||
CombatToggleCombat,
|
||
// Mode-dependent (dormant in K — Phase L lights them up)
|
||
CombatDecreaseAttackPower,
|
||
CombatIncreaseAttackPower,
|
||
CombatLowAttack,
|
||
CombatMediumAttack,
|
||
CombatHighAttack,
|
||
CombatDecreaseMissileAccuracy,
|
||
CombatIncreaseMissileAccuracy,
|
||
CombatAimLow,
|
||
CombatAimMedium,
|
||
CombatAimHigh,
|
||
CombatPrevSpellTab,
|
||
CombatNextSpellTab,
|
||
CombatPrevSpell,
|
||
CombatCastCurrentSpell,
|
||
CombatNextSpell,
|
||
CombatFirstSpellTab,
|
||
CombatLastSpellTab,
|
||
CombatFirstSpell,
|
||
CombatLastSpell,
|
||
UseSpellSlot_1,
|
||
UseSpellSlot_2,
|
||
UseSpellSlot_3,
|
||
UseSpellSlot_4,
|
||
UseSpellSlot_5,
|
||
UseSpellSlot_6,
|
||
UseSpellSlot_7,
|
||
UseSpellSlot_8,
|
||
UseSpellSlot_9,
|
||
|
||
// ── Emotes ────────────────────────────────────────────
|
||
/// <summary>Cry emote (retail U).</summary>
|
||
Cry,
|
||
/// <summary>Laugh emote (retail I).</summary>
|
||
Laugh,
|
||
/// <summary>Cheer emote — celebratory jump (retail O).</summary>
|
||
Cheer,
|
||
/// <summary>Wave emote (retail J).</summary>
|
||
Wave,
|
||
/// <summary>Point emote (retail K).</summary>
|
||
PointState,
|
||
|
||
// ── Camera ────────────────────────────────────────────
|
||
/// <summary>Toggle alternate camera mode (retail F2 / Numpad-/).</summary>
|
||
CameraActivateAlternateMode,
|
||
/// <summary>Hold-MMB instant mouse-look — hardcoded behavior in K.2.</summary>
|
||
CameraInstantMouseLook,
|
||
CameraRotateLeft,
|
||
CameraRotateRight,
|
||
CameraRotateUp,
|
||
CameraRotateDown,
|
||
CameraMoveToward,
|
||
CameraMoveAway,
|
||
CameraViewDefault,
|
||
CameraViewFirstPerson,
|
||
CameraViewLookDown,
|
||
CameraViewMapMode,
|
||
|
||
// ── Scroll ────────────────────────────────────────────
|
||
/// <summary>Scroll up — wheel up or Ctrl+Up.</summary>
|
||
ScrollUp,
|
||
/// <summary>Scroll down — wheel down or Ctrl+Down.</summary>
|
||
ScrollDown,
|
||
|
||
// ── Mouse selection ───────────────────────────────────
|
||
/// <summary>Single left-click select.</summary>
|
||
SelectLeft,
|
||
/// <summary>Single right-click select.</summary>
|
||
SelectRight,
|
||
/// <summary>Single middle-click select.</summary>
|
||
SelectMid,
|
||
/// <summary>Double left-click select.</summary>
|
||
SelectDblLeft,
|
||
/// <summary>Double right-click select.</summary>
|
||
SelectDblRight,
|
||
/// <summary>Double middle-click select.</summary>
|
||
SelectDblMid,
|
||
|
||
// ── Acdream debug actions (existing F-key behavior) ──
|
||
/// <summary>F1 toggles entire DebugPanel visibility (acdream-only).</summary>
|
||
AcdreamToggleDebugPanel,
|
||
/// <summary>F2 toggles collision wireframes.</summary>
|
||
AcdreamToggleCollisionWires,
|
||
/// <summary>F3 dumps player + nearby entities to console.</summary>
|
||
AcdreamDumpNearby,
|
||
/// <summary>F7 cycles time of day.</summary>
|
||
AcdreamCycleTimeOfDay,
|
||
/// <summary>F8 decreases mouse sensitivity.</summary>
|
||
AcdreamSensitivityDown,
|
||
/// <summary>F9 increases mouse sensitivity.</summary>
|
||
AcdreamSensitivityUp,
|
||
/// <summary>F10 cycles weather.</summary>
|
||
AcdreamCycleWeather,
|
||
/// <summary>F (existing) toggles between fly camera and orbit/chase mode.</summary>
|
||
AcdreamToggleFlyMode,
|
||
/// <summary>Tab — currently toggles fly↔player mode (will be reassigned to ToggleChatEntry in K.1c).</summary>
|
||
AcdreamTogglePlayerMode,
|
||
/// <summary>Hold-RMB chase-camera orbit (debug-only, not user-rebindable).
|
||
/// Camera orbits around the player while held; never drives character yaw.</summary>
|
||
AcdreamRmbOrbitHold,
|
||
/// <summary>Fly-camera descend (Ctrl) — only meaningful while fly camera
|
||
/// is active. K.1b binds it to ControlLeft; K.1c may rebind.</summary>
|
||
AcdreamFlyDown,
|
||
|
||
// ── AcdreamCameraCommands ─────────────────────────────
|
||
/// <summary>Camera zoom in (held key, integrates Distance−= adjSpeed·dt). Default unbound.</summary>
|
||
CameraZoomIn,
|
||
/// <summary>Camera zoom out (held key, integrates Distance+= adjSpeed·dt). Default unbound.</summary>
|
||
CameraZoomOut,
|
||
/// <summary>Camera raise (held key, integrates Pitch+= adjSpeed·dt·0.02). Default unbound.</summary>
|
||
CameraRaise,
|
||
/// <summary>Camera lower (held key, integrates Pitch−= adjSpeed·dt·0.02). Default unbound.</summary>
|
||
CameraLower,
|
||
}
|