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();