I was just playing around with the menu tutorial source, when it happened:
Nothin'!
Code: Select all
class CMenuEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event);
};
bool CMenuEventReceiver::OnEvent(SEvent event)
{
printf("This Text ist shown on console\n");
printf("%d - %d\n", event.EventType, EET_GUI_EVENT);
if (event.EventType == EET_GUI_EVENT)
{
printf("This text is not shown on console\n");
s32 id = event.GUIEvent.Caller->getID();
IGUIEnvironment *env = global_var.device->getGUIEnvironment();
switch (event.GUIEvent.EventType)
{
case EGET_BUTTON_CLICKED:
{
if (id == MENUID_CHOOSE_MISSION)
{
IGUIWindow* window = env->addWindow(rect<s32>(100, 100, 300, 200), true, L"Choose Mission");
env->addStaticText(L"Please close me",
rect<s32>(35,35,140,50),
false, // border?,
false, // wordwrap?
window);
}
} break;
} // switch (event.GUIEvent.EventType)
} // if (event.EventType == EET_GUI_EVENT)
return true;
}
Code: Select all
if (event.EventType == EET_GUI_EVENT)
Would by nice, if you could help me