Problem with modefing the menu tutorial source

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Problem with modefing the menu tutorial source

Post by Peter Müller »

Hi there!
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;
}
This if returns 'false'

Code: Select all

 if (event.EventType == EET_GUI_EVENT)
Why?

Would by nice, if you could help me
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

I don't wanna spam :D, but can really nobody help me :(
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Post Reply