from my event reciever
Code: Select all
case EGET_MENU_ITEM_SELECTED:
{
// a menu item was clicked
menu = (IGUIContextMenu*)event.GUIEvent.Caller;
s32 id = menu->getItemCommandId(menu->getSelectedItem());
switch(id)
{
case 100: // File -> Open Model
break;
case 200: // File -> Quit
device->closeDevice();
break;
case 300:
break;
case 400:
break;
case 500:
break;
}
return true;
}
Code: Select all
menu = env->addMenu();
menu->addItem(L"File", -1, true, true);
menu->addItem(L"Layers", -1, true, true);
submenu = menu->getSubMenu(0);
submenu->addItem(L"Open", 100);
submenu->addItem(L"Quit", 200);
submenu->setItemEnabled()
submenu = menu->getSubMenu(1);
submenu->addItem(L"Layer 1", 300);
submenu->addItem(L"Layer 2", 400);
submenu->addItem(L"Layer 3", 500);
and
IGUIElement* e = root->getElementFromId(5000, true);
Should I be using something like this to fix my problem?
I am also having a similar problem with my scrollbar, which doesn't move when I click on it.
Any assistance is very appreciated.