Commit f67fcbc1 authored by hybrid's avatar hybrid

Named the event structs. Fixed a warning with endif comments.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@817 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 001e09d0
...@@ -139,11 +139,7 @@ namespace irr ...@@ -139,11 +139,7 @@ namespace irr
//! SEvents hold information about an event. //! SEvents hold information about an event.
struct SEvent struct SEvent
{ {
EEVENT_TYPE EventType; struct SGUIEvent
union
{
struct
{ {
//! IGUIElement who called the event //! IGUIElement who called the event
gui::IGUIElement* Caller; gui::IGUIElement* Caller;
...@@ -154,9 +150,9 @@ struct SEvent ...@@ -154,9 +150,9 @@ struct SEvent
//! Type of GUI Event //! Type of GUI Event
gui::EGUI_EVENT_TYPE EventType; gui::EGUI_EVENT_TYPE EventType;
} GUIEvent; };
struct struct SMouseInput
{ {
//! X position of mouse cursor //! X position of mouse cursor
s32 X; s32 X;
...@@ -170,9 +166,9 @@ struct SEvent ...@@ -170,9 +166,9 @@ struct SEvent
//! type of mouse event //! type of mouse event
EMOUSE_INPUT_EVENT Event; EMOUSE_INPUT_EVENT Event;
} MouseInput; };
struct struct SKeyInput
{ {
//! Character corresponding to the key (0, if not a character) //! Character corresponding to the key (0, if not a character)
wchar_t Char; wchar_t Char;
...@@ -188,18 +184,18 @@ struct SEvent ...@@ -188,18 +184,18 @@ struct SEvent
//! true if ctrl was also pressed //! true if ctrl was also pressed
bool Control; bool Control;
} KeyInput; };
struct struct SLogEvent
{ {
//! pointer to text which has been logged //! pointer to text which has been logged
const c8* Text; const c8* Text;
//! log level in which the text has been logged //! log level in which the text has been logged
ELOG_LEVEL Level; ELOG_LEVEL Level;
} LogEvent; };
struct struct SUserEvent
{ {
//! Some user specified data as int //! Some user specified data as int
s32 UserData1; s32 UserData1;
...@@ -209,8 +205,16 @@ struct SEvent ...@@ -209,8 +205,16 @@ struct SEvent
//! Some user specified data as float //! Some user specified data as float
f32 UserData3; f32 UserData3;
} UserEvent; };
EEVENT_TYPE EventType;
union
{
struct SGUIEvent GUIEvent;
struct SMouseInput MouseInput;
struct SKeyInput KeyInput;
struct SLogEvent LogEvent;
struct SUserEvent UserEvent;
}; };
}; };
......
...@@ -1059,7 +1059,7 @@ u8 BuiltInFontData[] = ...@@ -1059,7 +1059,7 @@ u8 BuiltInFontData[] =
} // end namespace gui } // end namespace gui
} // end namespace irr } // end namespace irr
#endif _IRR_COMPILE_WITH_GUI_ #endif // _IRR_COMPILE_WITH_GUI_
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment