EET_GUI_EVENT

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
fnolis

EET_GUI_EVENT

Post by fnolis »

I'm trying to get my eventhandler to work. Currently it seems to handle every incoming event _except_ for the EET_GUI_EVENT.
When I debug the program I use a cout << event.EventType << endl; to see what incoming events that I get but there is no-show for "0" (which is the ENUM val of EET_GUI_EVENT).

Code: Select all

IGUIEnvironment* guienv = device->getGUIEnvironment();
guienv->addButton( rect<s32>(2,2,60,20), NULL, 101, L"Quit" );

while( device->run() && videodriver )
{
  if( device->isWindowActive() )
  {
    videodriver->beginScene( true, true, bgcolor );
    videodriver->draw2DImage( background, position2d<int>(0,0) );
    guienv->drawAll();
    videodriver->endScene();
  }
}
have I missed / forgott something?
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

I'm not sure the NULL for the ID of the parent node is a good thing.

From what I remember, 0 would be the ID to use if you don't want it to have a parent.
Crud, how do I do this again?
lobbin

solved

Post by lobbin »

I managed to solve this.

Appearently the OnEvent callback must return false by default otherwise createDevice seems to break somehow internally.
Post Reply