Captures mouse state at a given instant (buttons, position, wheel).
More...
#include <spk_mouse.hpp>
|
| enum | Button { Right
, Middle
, Left
} |
| | Mouse buttons tracked by the input system.
|
|
| InputState & | operator[] (const Button p_button) |
| | Accesses the state of a mouse button.
|
| const InputState & | operator[] (const Button p_button) const |
| | Accesses the state of a mouse button.
|
|
|
std::array< InputState, NbButton > | buttons |
| | Button states ordered as Right, Middle, Left.
|
|
spk::Vector2Int | position = {0, 0} |
| | Current cursor position.
|
|
spk::Vector2Int | deltaPosition = {0, 0} |
| | Current delta position between current frame and the previous one.
|
|
float | wheel = 0 |
| | Wheel delta.
|
|
|
static const size_t | NbButton = 3 |
| | Number of mouse buttons supported.
|
Captures mouse state at a given instant (buttons, position, wheel).
◆ operator[]() [1/2]
| InputState & spk::Mouse::operator[] |
( |
const Button | p_button | ) |
|
|
inline |
Accesses the state of a mouse button.
- Parameters
-
- Returns
- Mutable reference to the button state.
◆ operator[]() [2/2]
| const InputState & spk::Mouse::operator[] |
( |
const Button | p_button | ) |
const |
|
inline |
Accesses the state of a mouse button.
- Parameters
-
- Returns
- Const reference to the button state.
The documentation for this struct was generated from the following file: