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
master
hybrid 2007-08-02 08:07:54 +00:00
parent 001e09d013
commit f67fcbc13e
2 changed files with 74 additions and 70 deletions

View File

@ -139,11 +139,7 @@ namespace irr
//! SEvents hold information about an event.
struct SEvent
{
EEVENT_TYPE EventType;
union
{
struct
struct SGUIEvent
{
//! IGUIElement who called the event
gui::IGUIElement* Caller;
@ -154,9 +150,9 @@ struct SEvent
//! Type of GUI Event
gui::EGUI_EVENT_TYPE EventType;
} GUIEvent;
};
struct
struct SMouseInput
{
//! X position of mouse cursor
s32 X;
@ -170,9 +166,9 @@ struct SEvent
//! type of mouse event
EMOUSE_INPUT_EVENT Event;
} MouseInput;
};
struct
struct SKeyInput
{
//! Character corresponding to the key (0, if not a character)
wchar_t Char;
@ -188,18 +184,18 @@ struct SEvent
//! true if ctrl was also pressed
bool Control;
} KeyInput;
};
struct
struct SLogEvent
{
//! pointer to text which has been logged
const c8* Text;
//! log level in which the text has been logged
ELOG_LEVEL Level;
} LogEvent;
};
struct
struct SUserEvent
{
//! Some user specified data as int
s32 UserData1;
@ -209,8 +205,16 @@ struct SEvent
//! Some user specified data as float
f32 UserData3;
} UserEvent;
};
EEVENT_TYPE EventType;
union
{
struct SGUIEvent GUIEvent;
struct SMouseInput MouseInput;
struct SKeyInput KeyInput;
struct SLogEvent LogEvent;
struct SUserEvent UserEvent;
};
};

View File

@ -1059,7 +1059,7 @@ u8 BuiltInFontData[] =
} // end namespace gui
} // end namespace irr
#endif _IRR_COMPILE_WITH_GUI_
#endif // _IRR_COMPILE_WITH_GUI_
#endif