|
lmgl 1.0.0
A lightweight OpenGL graphics engine library written in C++
|
Static input helper class. More...
#include <input.hpp>
Static Public Member Functions | |
| static bool | is_key_pressed (core::Key key) |
| Check if a key is currently pressed. | |
| static bool | is_key_just_pressed (core::Key key) |
| Check if a key was just pressed this frame. | |
| static bool | is_key_just_released (core::Key key) |
| Check if a key was just released this frame. | |
| static bool | is_mouse_button_pressed (int button) |
| Check if a mouse button is pressed. | |
| static glm::vec2 | get_mouse_position () |
| Get mouse position. | |
| static glm::vec2 | get_mouse_delta () |
| Get mouse position delta since last frame. | |
| static glm::vec2 | get_scroll_offset () |
| Get scroll offset since last frame. | |
| static void | set_mouse_position (double x, double y) |
| Set mouse position. | |
| static void | set_cursor_mode (core::CursorMode mode) |
| Set cursor mode. | |
Static input helper class.
Provides convenient static methods to check keyboard and mouse input without needing to reference the Engine singleton everywhere.
|
static |
Get mouse position delta since last frame.
|
static |
Get mouse position.
|
static |
Get scroll offset since last frame.
|
static |
Check if a key was just pressed this frame.
| key | Key to check. |
|
static |
Check if a key was just released this frame.
| key | Key to check. |
|
static |
Check if a key is currently pressed.
| key | Key to check. |
|
static |
Check if a mouse button is pressed.
| button | Mouse button to check (0=left, 1=right, 2=middle). |
|
static |
Set cursor mode.
| mode | Cursor mode (Normal, Hidden, Disabled). |
|
static |
Set mouse position.
| x | X coordinate. |
| y | Y coordinate. |