MCPcopy Create free account
hub / github.com/MyGUI/mygui / createItemChildByType

Method createItemChildByType

MyGUIEngine/src/MyGUI_MenuControl.cpp:411–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409 }
410
411 Widget* MenuControl::createItemChildByType(size_t _index, std::string_view _type)
412 {
413 MYGUI_ASSERT_RANGE(_index, mItemsInfo.size(), "MenuControl::createItemChildByType");
414 removeItemChildAt(_index);
415 Widget* child = mItemsInfo[_index].item->createWidgetT(
416 WidgetStyle::Popup,
417 _type,
418 mSubMenuSkin,
419 IntCoord(),
420 Align::Default,
421 mSubMenuLayer);
422 MYGUI_ASSERT(child->isType<MenuControl>(), "child must have MenuControl base type");
423 return child;
424 }
425
426 void MenuControl::notifyMouseButtonClick(Widget* _sender)
427 {

Callers

nothing calls this directly

Calls 3

IntCoordFunction · 0.50
sizeMethod · 0.45
createWidgetTMethod · 0.45

Tested by

no test coverage detected