Close Menu Implemented

closeMenu function on guiMenuBar implemented. Closes menu when selecting a popup menu action.
This commit is contained in:
Olathuss 2025-01-25 22:59:17 -07:00
parent 71d08e9e0c
commit 44df6dada7
2 changed files with 14 additions and 0 deletions

View file

@ -247,6 +247,10 @@ void GuiPopupMenuTextListCtrl::onMouseUp(const GuiEvent &event)
{
if (item->mEnabled)
{
if(mMenuBar)
{
mMenuBar->closeMenu();
}
Con::executef(mPopup, "onSelectItem", Con::getIntArg(getSelectedCell().y), item->mText.isNotEmpty() ? item->mText : String(""));
}
}