You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jay19240 edited this page Dec 18, 2024
·
3 revisions
InputManager
Singleton input manager.
Handle various sources such as keyboard, mouse and gamepad.
It emit 'E_ACTION_ONCE' with data { actionId }.
It emit 'E_ACTION' with data { actionId }.
It emit 'E_ACTION_RELEASED' with data { actionId }
It emit 'E_MOUSE_DOWN' with data { buttons }
It emit 'E_MOUSE_UP'
It emit 'E_MOUSE_MOVE' with data { movementX, movementY }
It emit 'E_MOUSE_DRAG' with data { movementX, movementY }
It emit 'E_MOUSE_WHEEL' with data { delta }
It emit 'E_POINTER_LOCK_CHANGED' with data { lockChanged }
It emit 'E_GAMEPAD_CONNECTED' with data { id }
It emit 'E_GAMEPAD_DISCONNECTED' with data { id }
It emit 'E_GAMEPAD_REMOVED' with data { id }
Default actions table:
■ ACTION => KEYBOARD => GAMEPAD
■ OK => Enter => 0
■ BACK => Escape => 1
■ SELECT => Space => BtnSelect
■ LEFT => ArrowLeft => PadLeft
■ RIGHT => ArrowRight => PadRight
■ UP => ArrowUp => PadTop
■ DOWN => ArrowDown => PadBottom