|
Flint Engine
Modular C++20 2D game engine powered by SDL3
|
A tagged union representing a single application input or window event. More...
#include <flint/input/event.h>
Collaboration diagram for Flint::AppEvent:Public Attributes | ||
| EventType | type | |
| union { | ||
| struct { | ||
| GamepadAxis axis | ||
| float value | ||
| } gamepadAxis | ||
| Data for GamepadAxisMove events. | ||
| struct { | ||
| GamepadButton button | ||
| } gamepadButton | ||
| Data for GamepadButtonPressed / GamepadButtonReleased events. | ||
| struct { | ||
| SDL_Keycode keycode | ||
| } key | ||
| Data for KeyDown / KeyUp events. | ||
| struct { | ||
| Vec2< float > position | ||
| } mouseMove | ||
| Data for MouseMove events. | ||
| struct { | ||
| uint8_t button | ||
| Vec2f position | ||
| } mouseButton | ||
| Data for MouseButtonDown / MouseButtonUp events. | ||
| }; | ||
A tagged union representing a single application input or window event.
The active union member is determined by the type field. Access the appropriate sub-struct after checking type.