summaryrefslogtreecommitdiffstats
path: root/src/common/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/event.h')
-rw-r--r--src/common/event.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/event.h b/src/common/event.h
index 70b110d..6ce1a79 100644
--- a/src/common/event.h
+++ b/src/common/event.h
@@ -36,6 +36,7 @@ enum EventType
// TODO: document the meaning of each value
+ //! Invalid event / no event
EVENT_NULL = 0,
//! Event sent on user or system quit request
@@ -638,6 +639,9 @@ struct Event
//! Type of event (EVENT_*)
EventType type;
+ //! If true, the event was produced by system (SDL); else, it has come from user interface
+ bool systemEvent;
+
//! Additional data for EVENT_KEY_DOWN and EVENT_KEY_UP
KeyEventData key;
//! Additional data for EVENT_MOUSE_BUTTON_DOWN and EVENT_MOUSE_BUTTON_UP
@@ -657,7 +661,8 @@ struct Event
//? short keyState; // state of the keyboard (KS_ *)
//? float rTime; // relative time
- Event(EventType aType = EVENT_NULL) : type(aType) {}
+ Event(EventType aType = EVENT_NULL)
+ : type(aType), systemEvent(false) {}
};