7#include "structure/math/spk_vector2.hpp"
8#include "type/spk_input_state.hpp"
53 state = InputState::Up;
64 return buttons[
static_cast<size_t>(p_button)];
74 return buttons[
static_cast<size_t>(p_button)];
81 std::ostream &operator<<(std::ostream &p_stream,
const Mouse::Button &p_button);
82 std::wostream &operator<<(std::wostream &p_stream,
const Mouse::Button &p_button);
InputState & operator[](const Button p_button)
Accesses the state of a mouse button.
Definition spk_mouse.hpp:62
const InputState & operator[](const Button p_button) const
Accesses the state of a mouse button.
Definition spk_mouse.hpp:72
Button
Mouse buttons tracked by the input system.
Definition spk_mouse.hpp:22
static const size_t NbButton
Number of mouse buttons supported.
Definition spk_mouse.hpp:30
spk::Vector2Int deltaPosition
Current delta position between current frame and the previous one.
Definition spk_mouse.hpp:43
float wheel
Wheel delta.
Definition spk_mouse.hpp:47
spk::Vector2Int position
Current cursor position.
Definition spk_mouse.hpp:39
std::array< InputState, NbButton > buttons
Button states ordered as Right, Middle, Left.
Definition spk_mouse.hpp:35