diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-07-22 22:05:12 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-07-22 22:05:12 +0200 |
commit | 8797569d33c4917eb8f8a1dc2341aac7b5815315 (patch) | |
tree | 839aca030b0d3ed36cef15b051fbfd4bf8ecb754 /src/common/event.h | |
parent | 86ea086790a677d6de6a836e7562814d3ba30bd1 (diff) | |
download | colobot-8797569d33c4917eb8f8a1dc2341aac7b5815315.tar.gz colobot-8797569d33c4917eb8f8a1dc2341aac7b5815315.tar.bz2 colobot-8797569d33c4917eb8f8a1dc2341aac7b5815315.zip |
Texture & mouse functions; refactoring & fixes
- cleaned up and added documentation to engine.h
- refactored CEngine interface and associated structs
- added mouse handling functions in CApplication & CEngine
- fixed bugs in projection matrix setting
- changed texture loading & handling
- added const-values in CDevice & CGLDevice
- changed event management in CApplication
- other minor changes & bugfixes
Diffstat (limited to 'src/common/event.h')
-rw-r--r-- | src/common/event.h | 7 |
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) {} }; |