Lums
|
A struct describing an event. More...
#include <Event.hpp>
Public Types | |
enum | Type { None = 0, GamepadConnected, GamepadDisconnected, KeyDown, KeyUp, ButtonDown, ButtonUp, LeftMouseDown, LeftMouseUp, RightMouseDown, RightMouseUp, MouseMove, LeftStick, RightStick, LeftTrigger, RightTrigger } |
Public Attributes | |
Event::Type | type |
union { | |
Key key | |
struct { | |
uintptr_t id | |
union { | |
int button | |
float trigger | |
struct { | |
float x | |
float y | |
} stick | |
} | |
} gamepad | |
struct { | |
int x | |
int y | |
} mouse | |
}; | |
A struct describing an event.
|
strong |
An enum describing the event type
union { ... } |
A tagged union for the event data
int lm::Event::button |
The button id
struct { ... } lm::Event::gamepad |
A struct describing the gamepad state
uintptr_t lm::Event::id |
The gamepad id
Key lm::Event::key |
The event key
struct { ... } lm::Event::mouse |
A struct describing the mouse
struct { ... } lm::Event::stick |
A struct describing a stick
float lm::Event::trigger |
The normalized trigger value
Event::Type lm::Event::type |
The event type
float lm::Event::x |
The normalized stick direction on the x axis
int lm::Event::x |
The cursor x position
float lm::Event::y |
The normalized stick direction on the y axis
int lm::Event::y |
The cursor y position