SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
InputEvent.hpp
Go to the documentation of this file.
1#ifndef _INPUTEVENTS_HPP_
2#define _INPUTEVENTS_HPP_
3
4namespace Sleak {
5 namespace Input {
6
7 /// Kind of raw keyboard event delivered through this low-level input path.
8 /// @ingroup input
15
16 /// Kind of raw mouse event delivered through this low-level input path.
17 /// @ingroup input
25
26 /// Kind of raw gamepad event delivered through this low-level input path.
27 /// @ingroup input
33
34 /// Keyboard Events
35 /// @ingroup input
43
44 /// Mouse Events
45 /// @ingroup input
46 struct MouseEvent {
50 int mouseXRel, mouseYRel; // Relative motion
51 int wheelX, wheelY; // Mouse wheel delta
52
54 };
55
56 /// Gamepad Events (if needed)
57 /// @ingroup input
58 struct GamepadEvent {
60 int button; // SDL_CONTROLLER_BUTTON_*
61 int axis; // Axis index
62 float axisValue; // -1.0f to 1.0f
63
64 GamepadEvent() : deviceID(0), button(0), axis(0), axisValue(0.0f) {}
65 };
66
67 }
68}
69
70#endif
Key and mouse-button code enumerations plus their name lookups.
Root namespace for everything the engine exposes.
Definition Camera.hpp:10