I tried it like this, but that doesn't work:
Code: Select all
void cEditorGUI::setGUIEnabled(IrrlichtDevice* irrDev, bool enable){
IGUIEnvironment* tmp = irrDev->getGUIEnvironment();
IGUIElement* root = tmp->getRootGUIElement();
IGUIContextMenu* e = (IGUIContextMenu*)root->getElementFromId(IDMenuMenu, true);
IGUIContextMenu* submenu = e->getSubMenu(0);
submenu->setItemEnabled(IDMenuProgEnde, enable);
}I can set the sub menu (e) to enabled and disabled with e->setEnabled(bool), but I can't get it to work with the menu item!
thx, Acki