MyeventReceiver

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
walrus
Posts: 2
Joined: Sun Jun 06, 2004 6:46 am

MyeventReceiver

Post by walrus »

I'm using dev-cpp and the event reciever for my main menu generates and illigal operation. I think it's somthing to do with create device on the last parameter. I experimented with the event reciever parts and deleted some sections. Dev-cpp compiles the user interface example fine.

Here's a part of my Code after the headers and namespaces(i'm using all of them):

Code: Select all

IrrlichtDevice *device = 0;

class MyEventReceiver : public IEventReceiver{public:	virtual bool OnEvent(SEvent event)	{		if (event.EventType == EET_GUI_EVENT)		{			s32 id = event.GUIEvent.Caller->getID();			IGUIEnvironment* env = device->getGUIEnvironment();
            switch(event.GUIEvent.EventType)
            {
            
              
      
              
            }
       }
       return false;
    }
 };


bool startButton;

int menu(bool start)
{


   MyEventReceiver receiver;
    
    IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(512, 384), 16, false, false, &receiver); 

    device->setWindowCaption(L"Fusion");

	ISceneManager* smgr = device->getSceneManager();
    IVideoDriver* driver = device->getVideoDriver();
   	IGUIEnvironment* env = device->getGUIEnvironment();
  
after that there's a tab some text and a button.
Post Reply