Code: Select all
void loadmenu()
{
IGUISkin* skin = env->getSkin();
IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
if (font)
skin->setFont(font);
skin->setFont(env->getBuiltInFont(), EGDF_TOOLTIP);
env->addButton(rect<s32>(10,variable::getvar_int("ResolutionY") - 30,110,variable::getvar_int("ResolutionY") - 10), 0, GUI_ID_QUIT_BUTTON,
L"Quit", L"Exits Program");
env->addButton(rect<s32>(10,variable::getvar_int("ResolutionY") - 60,110,variable::getvar_int("ResolutionY") - 40), 0, GUI_ID_START_BUTTON,
L"Start", L"Start Game");
// Store the appropriate data in a context structure.
SAppContext context;
context.device = device;
context.counter = 0;
// Then create the event receiver, giving it that context structure.
//MyEventReceiver receiver(context);
// And tell the device to use our custom event receiver.
//device->setEventReceiver(&receiver);
}
void menuloop()
{
if(device->run())
{
driver->beginScene(true, true, SColor(0,200,200,200));
env->drawAll();
smgr->drawAll();
driver->endScene();
}
}