ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
event.h
Go to the documentation of this file.
1
8
9#ifndef ASW_MODULES_UI_EVENT_H
10#define ASW_MODULES_UI_EVENT_H
11
12#include <string>
13
14#include "../geometry.h"
15#include "../input.h"
16
17namespace asw::ui {
18
21struct UIEvent {
23 enum class Type {
24 KeyDown,
25 KeyUp,
32 Back
33 };
34
37
40
42 int pointer_id { 0 };
43
46
49
51 std::string text {};
52};
53
54} // namespace asw::ui
55
56#endif // ASW_MODULES_UI_EVENT_H
A 2D vector in space.
Definition geometry.h:27
Common geometry types.
Input module for the ASW library.
Key
Enumeration of keys in the ASW library.
Definition input.h:38
MouseButton
Enumeration of mouse buttons in the ASW library.
Definition input.h:28
Event structure for UI interactions.
Definition event.h:21
Type
Enumeration of UI event types.
Definition event.h:23
asw::Vec2< float > pointer_pos
The pointer position.
Definition event.h:45
asw::input::MouseButton mouse_button
The mouse button associated with the event.
Definition event.h:48
std::string text
The text associated with a TextInput event.
Definition event.h:51
int pointer_id
The pointer identifier.
Definition event.h:42
asw::input::Key key
The key associated with the event.
Definition event.h:39
Type type
The type of the event.
Definition event.h:36