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

Method getItemIndexById

MyGUIEngine/src/MyGUI_MenuControl.cpp:644–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642 }
643
644 size_t MenuControl::getItemIndexById(std::string_view _id) const
645 {
646 for (size_t index = 0; index < mItemsInfo.size(); index++)
647 {
648 if (mItemsInfo[index].id == _id)
649 return index;
650 }
651 MYGUI_EXCEPT("item id (" << _id << ") not found, source 'MenuControl::getItemById'");
652 }
653
654 MenuItem* MenuControl::findItemById(std::string_view _id, bool _recursive)
655 {

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected