![]() |
Lysa
0.0
Lysa 3D Engine
|
Static input helper responsible for keyboard, mouse and gamepad state.
Responsibilities:
Notes:
Static Public Member Functions | |
| static bool | isKeyPressed (Key key) |
| static bool | isKeyJustPressed (Key key) |
| static bool | isKeyJustReleased (Key key) |
| static float2 | getKeyboardVector (Key negX, Key posX, Key negY, Key posY) |
| static bool | isMouseButtonPressed (MouseButton mouseButton) |
| static bool | isMouseButtonJustPressed (MouseButton mouseButton) |
| static bool | isMouseButtonJustReleased (MouseButton mouseButton) |
| static uint32 | getConnectedJoypads () |
| static bool | isGamepad (uint32 index) |
| static std::string | getJoypadName (uint32 index) |
| static float2 | getGamepadVector (uint32 index, GamepadAxisJoystick axisJoystick) |
| static bool | isGamepadButtonPressed (uint32 index, GamepadButton gamepadButton) |
| static bool | isGamepadButtonJustReleased (GamepadButton button) |
| static bool | isGamepadButtonJustPressed (GamepadButton button) |
| static void | addAction (const InputAction &action) |
| static bool | isAction (const std::string &actionName, const InputEvent &inputEvent) |
|
static |
Register a high-level input action that can be matched against events. If an action with the same name exists, it is replaced.
|
static |
Returns the number of connected joypads (gamepads included).
|
static |
Returns the 2D vector for a gamepad joystick axis pair. Deadzone is applied internally and output is normalized to [-1, 1].
| index | Index in range [0 .. getConnectedJoypads()). |
| axisJoystick | Joystick selector (e.g., left or right stick). |
|
static |
Returns a human-readable name for the joypad at index.
| index | Index in range [0 .. getConnectedJoypads()). |
|
static |
Checks whether the given input event matches the named action.
| actionName | Name of a previously registered action. |
| inputEvent | Concrete input event to test. |
|
static |
Returns true if the device at index is recognized as a gamepad.
| index | Index in range [0 .. getConnectedJoypads()). |
|
static |
Returns true on the frame the specified gamepad button is pressed.
|
static |
Returns true on the frame the specified gamepad button is released.
|
static |
Returns true while the given gamepad button is currently held down.
| index | Index in range [0 .. getConnectedJoypads()). |
| gamepadButton | Button identifier. |
|
static |
Returns true only on the frame the user starts pressing the key. Subsequent frames while held return false until released and pressed again.
| key | Logical key code. |
|
static |
Returns true only on the frame the user releases the key.
| key | Logical key code. |
|
static |
Returns true while the given key is currently held down.
| key | Logical key code. |
|
static |
Returns true only on the frame the user starts pressing the mouse button.
| mouseButton | Mouse button identifier. |
|
static |
Returns true only on the frame the user releases the mouse button.
| mouseButton | Mouse button identifier. |
|
static |
Returns true while the given mouse button is currently held down.
| mouseButton | Mouse button identifier. |
|
friend |
|
friend |