bool Menu::GetOpen() const { for (auto i = _inner_panel->GetChildren().begin(); i != _inner_panel->GetChildren().end(); ++i) { MenuItem* item = dynamic_cast<MenuItem*>(*i); if (item != nullptr && item->GetOpen()) { return true; } } return false; }
void Menu::_OnHoverItem(Gwen::Controls::Base* control) { if (!GetHoverOpenMenu()) { return; } MenuItem* item = dynamic_cast<MenuItem*>(control); if (item != nullptr && !item->GetOpen()) { CloseSubMenus(); item->Open(); } }