|
void | addEvent (const EventType type, const EventData &data) noexcept |
| Add a new event to be processed.
|
|
void | processEvents (const bool clean_processed=true) noexcept |
| Compute EventHandler state from unprocessed events + make the event list available in getProcessedEvents()
|
|
const EventList & | getProcessedEvents () const noexcept |
| Get a list of events that happened during the frame.
|
|
bool | isKeyPressed (const key_code_t &key, const bool &strict=false) const noexcept |
| Check if a keyboard key is pressed.
|
|
bool | hasKeyChanged (const key_code_t &key) const noexcept |
| Check if a keyboard key state changed this frame.
|
|
bool | isKeyJustPressed (const key_code_t &key) const noexcept |
| Check if a keyboard was just pressed this frame.
|
|
bool | isClicked (const key_code_t &key, const bool &strict=false) const noexcept |
| Check if mouse button is clicked.
|
|
bool | isHold (const key_code_t &key) const noexcept |
| Check if key or mouse button is hold.
|
|
void | resetAllStates () noexcept |
| Force all keys / buttons as released.
|
|
bool | isEscapePressed () const noexcept |
| Check if the ESC key is pressed.
|
|
bool | isCtrlPressed () const noexcept |
| Check if any of CTRL keys are pressed.
|
|
bool | isAltPressed () const noexcept |
| Check if any of ALT keys are pressed.
|
|
bool | isShiftPressed () const noexcept |
| Check if any of SHIFT keys are pressed.
|
|
bool | isSpacePressed () const noexcept |
| Check if the space bar is pressed.
|
|
bool | isSuperPressed () const noexcept |
| Check if the super key is pressed.
|
|
const glm::vec2 & | getMouseScroll () const noexcept |
|
void | setMouseScroll (const glm::vec2 &scroll) noexcept |
|
const glm::vec2 & | getCursorPos () const noexcept |
|
const glm::vec2 & | getCursorOffset () const noexcept |
|
void | forceState (const key_code_t &key, const int &state, const bool &isMouse=false) noexcept |
| Force key or mouse button status, ignoring the real status.
|
|
void | setCursorPos (const glm::vec2 &cursor_pos) noexcept |
|