MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / insert

Method insert

Engine/source/gui/editor/guiMenuBar.cpp:1455–1474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1453}
1454
1455void GuiMenuBar::insert(SimObject* pObject, S32 pos)
1456{
1457 PopupMenu* menu = dynamic_cast<PopupMenu*>(pObject);
1458 if (menu == nullptr)
1459 return;
1460
1461 MenuEntry newMenu;
1462 newMenu.pos = pos >= mMenuList.size() || pos == -1 ? pos = mMenuList.size() : pos;
1463 newMenu.drawBitmapOnly = false;
1464 newMenu.drawBorder = true;
1465 newMenu.bitmapIndex = -1;
1466 newMenu.text = menu->mBarTitle;
1467 newMenu.visible = true;
1468 newMenu.popupMenu = menu;
1469
1470 if (pos >= mMenuList.size() || pos == -1)
1471 mMenuList.push_back(newMenu);
1472 else
1473 mMenuList.insert(pos, newMenu);
1474}
1475
1476PopupMenu* GuiMenuBar::getMenu(U32 index)
1477{

Callers 15

setCapabilityMethod · 0.45
_initMethod · 0.45
initConstantDescsMethod · 0.45
_handleIncludesMethod · 0.45
GFXD3D11StateBlockMethod · 0.45
sRegisterFormatMethod · 0.45
setBitmapMethod · 0.45
setBitmapMethod · 0.45
lineInsertedMethod · 0.45
createLineWrappingMethod · 0.45
GuiSwatchButtonCtrlMethod · 0.45
setBitmapMethod · 0.45

Calls 2

sizeMethod · 0.45
push_backMethod · 0.45

Tested by 12

insertInspectorGroupFunction · 0.36
constructEditControlMethod · 0.36
constructMethod · 0.36
updateValueMethod · 0.36
onAddMethod · 0.36
getValueMethod · 0.36
setNameMethod · 0.36
refreshMethod · 0.36
addFieldMethod · 0.36