![]() |
Lysa
0.0
Lysa 3D Engine
|
Static input polling utilities.
Lua full name: lysa.Input
Public Member Functions | |
| boolean | is_key_pressed (key: integer)static |
| Returns true while the given key is held down. More... | |
| boolean | is_key_just_pressed (key: integer)static |
| Returns true only on the first frame the key was pressed. More... | |
| boolean | is_key_just_released (key: integer)static |
| Returns true only on the first frame the key was released. More... | |
| float2 | get_keyboard_vector (negX: integer, posX: integer, negY: integer, posY: integer)static |
| Builds a 2-D movement vector from four keys (e.g. WASD). More... | |
| boolean | is_mouse_button_pressed (button: integer)static |
| Returns true while the given mouse button is held down. More... | |
| boolean | is_mouse_button_just_pressed (button: integer)static |
| Returns true only on the first frame the mouse button was pressed. More... | |
| boolean | is_mouse_button_just_released (button: integer)static |
| Returns true only on the first frame the mouse button was released. More... | |
| integer | get_connected_joypads ()static |
| Returns the number of connected joypads/gamepads. More... | |
| boolean | is_gamepad (index: integer)static |
| Returns true if the joypad at the given index is a gamepad. More... | |
| string | get_joypad_name (index: integer)static |
| Returns the name string of the joypad at the given index. More... | |
| float2 | get_gamepad_vector (index: integer, axis: integer)static |
| Returns a 2-D vector from a gamepad joystick axis. More... | |
| boolean | is_gamepad_button_pressed (index: integer, button: integer)static |
| Returns true while the given gamepad button is held down. More... | |
| boolean | is_gamepad_button_just_released (button: integer)static |
| Returns true only on the first frame the gamepad button was released. More... | |
| boolean | is_gamepad_button_just_pressed (button: integer)static |
| Returns true only on the first frame the gamepad button was pressed. More... | |
| boolean | add_action (action: InputAction)static |
| Registers a named input action; returns true on success. More... | |
| boolean | is_action (name: string, event: InputEvent)static |
| Returns true if the given event matches the named action. More... | |
|
static |
Returns true while the given key is held down.
| key | integer |
|
static |
Returns true only on the first frame the key was pressed.
| key | integer |
|
static |
Returns true only on the first frame the key was released.
| key | integer |
|
static |
Builds a 2-D movement vector from four keys (e.g. WASD).
| negX | integer |
| posX | integer |
| negY | integer |
| posY | integer |
|
static |
Returns true while the given mouse button is held down.
| button | integer |
|
static |
Returns true only on the first frame the mouse button was pressed.
| button | integer |
|
static |
Returns true only on the first frame the mouse button was released.
| button | integer |
|
static |
Returns the number of connected joypads/gamepads.
|
static |
Returns true if the joypad at the given index is a gamepad.
| index | integer |
|
static |
Returns the name string of the joypad at the given index.
| index | integer |
|
static |
Returns a 2-D vector from a gamepad joystick axis.
| index | integer |
| axis | integer |
|
static |
Returns true while the given gamepad button is held down.
| index | integer |
| button | integer |
|
static |
Returns true only on the first frame the gamepad button was released.
| button | integer |
|
static |
Returns true only on the first frame the gamepad button was pressed.
| button | integer |
|
static |
Registers a named input action; returns true on success.
| action | InputAction |
|
static |
Returns true if the given event matches the named action.
| name | string |
| event | InputEvent |