if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
switch (event.GUIEvent.EventType)
{
case EGET_BUTTON_CLICKED:
if (id == 1)
{
}
break;
}
}
It wont enter the if block though, couldnt figure out why, do I miss something?
Depends on which block it won't enter (the id == 1 obviously only works when you got an id with that number).
But most likely reason - you return true in your event-receiver for mouse-events. Which tells Irrlicht that those events are handled by yourself and won't be passed on the GUI at all. Always return false by default in your event-receiver.