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

Method findItemById

MyGUIEngine/src/MyGUI_MenuControl.cpp:654–669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652 }
653
654 MenuItem* MenuControl::findItemById(std::string_view _id, bool _recursive)
655 {
656 for (const auto& info : mItemsInfo)
657 {
658 if (info.id == _id)
659 return info.item;
660
661 if (_recursive && info.submenu != nullptr)
662 {
663 MenuItem* find = info.submenu->findItemById(_id, _recursive);
664 if (find != nullptr)
665 return find;
666 }
667 }
668 return nullptr;
669 }
670
671 size_t MenuControl::findItemIndexWith(const UString& _name)
672 {

Callers 8

FindItemByIdFunction · 0.80
createMainMenuMethod · 0.80
updateRecentFilesMenuMethod · 0.80
updateMenuScaleMethod · 0.80
OnInitialiseMethod · 0.80
updateRecentFilesMenuMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected