Module
|
#include <InputCallback.hpp>
Public Member Functions | |
virtual void | onMouseDown (uint8_t button, uint16_t x, uint16_t y) |
virtual void | onMouseUp (uint8_t button, uint16_t x, uint16_t y) |
virtual void | onMouseMove (uint16_t x, uint16_t y, int16_t dx, int16_t dy) |
virtual void | onKeyDown (KeyCode::Code code, char keyChar) |
virtual void | onKeyUp (KeyCode::Code code, char keyChar) |
Protected Member Functions | |
InputCallback () | |
An abstract class to hook into events triggered by user input, such as mouse and key presses. Extend this class if you need to process these events.
|
inlineprotected |
|
inlinevirtual |
Called when a key is pressed.
key | The key that was pressed. |
|
inlinevirtual |
Called when a key is released.
key | The key that was released. |
|
inlinevirtual |
Called when a mouse button is pressed down.
button | The mouse button that was pressed. 0 is left button, 1 is right, 2 is middle. |
x | The x position of the mouse on screen. |
y | The y position of the mouse on screen. |
|
inlinevirtual |
Called when the mouse position changes.
x | The final x position of the mouse on screen. |
y | The final y position of the mouse on screen. |
dx | The change in the x position of the mouse. |
dy | The change in the y position of the mouse. |
|
inlinevirtual |
Called when a mouse button is released.
button | The mouse button that was released. 0 is left button, 1 is right, 2 is middle. |
x | The x position of the mouse on screen. |
y | The y position of the mouse on screen. |