MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / removeMenuItem

Method removeMenuItem

Engine/source/gui/editor/guiMenuBar.cpp:868–888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866}
867
868void GuiMenuBar::removeMenuItem(Menu *menu, MenuItem *menuItem)
869{
870 for(MenuItem **walk = &menu->firstMenuItem; *walk; walk = &(*walk)->nextMenuItem)
871 {
872 if(*walk == menuItem)
873 {
874 *walk = menuItem->nextMenuItem;
875 break;
876 }
877 }
878
879 // If this is a submenu, then be sure to clear the submenu's items
880 if(menuItem->isSubmenu)
881 {
882 clearSubmenuItems(menuItem);
883 }
884
885 dFree(menuItem->text);
886 dFree(menuItem->accelerator);
887 delete menuItem;
888}
889
890GuiMenuBar::MenuItem* GuiMenuBar::addMenuItem(Menu *menu, const char *text, U32 id, const char *accelerator, S32 checkGroup, const char *cmd )
891{

Callers 1

guiMenuBar.cppFile · 0.80

Calls 1

dFreeFunction · 0.50

Tested by

no test coverage detected