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

Method notifyRootKeyChangeFocus

MyGUIEngine/src/MyGUI_MenuControl.cpp:390–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388 }
389
390 void MenuControl::notifyRootKeyChangeFocus(Widget* _sender, bool _focus) const
391 {
392 MenuItem* item = _sender->castType<MenuItem>();
393 if (item->getItemType() == MenuItemType::Popup)
394 {
395 if (_focus)
396 {
397 if (!mMenuDropMode || mIsMenuDrop)
398 {
399 item->setItemChildVisible(true);
400 item->setStateSelected(true);
401 }
402 }
403 else
404 {
405 item->setItemChildVisible(false);
406 item->setStateSelected(false);
407 }
408 }
409 }
410
411 Widget* MenuControl::createItemChildByType(size_t _index, std::string_view _type)
412 {

Callers

nothing calls this directly

Calls 3

setStateSelectedMethod · 0.80
getItemTypeMethod · 0.45
setItemChildVisibleMethod · 0.45

Tested by

no test coverage detected