Expands functionality of MenuBuilder to act as primary API for building out menus

Shifts "Help" menubar entry in world editor to use new API structure as example/test
Removes extraneous 'MainEditor'
Adds EditorCore module
Moved Menubuilder to EditorCore module
Fixes Help Menu editor settings so they properly point at modern documentation and forum URLs
Fixes handling of MenuBar so when inserting new items, ensures the menubar refreshes as would be expected
Adds remove function to menubar to remove a menu
Removes old commented console methods from menubar file
Adds checks for onMouseDown and onMouseUp for PopupMenu so items that are submenus aren't clickable like normal items
This commit is contained in:
Areloch 2023-10-22 00:47:29 -05:00
parent 54959f0d19
commit c2d1e9d654
10 changed files with 547 additions and 1441 deletions

View file

@ -210,11 +210,31 @@ bool GuiPopupMenuTextListCtrl::onKeyDown(const GuiEvent &event)
void GuiPopupMenuTextListCtrl::onMouseDown(const GuiEvent &event)
{
if(mLastHighlightedMenuIdx != -1)
{
//See if we're trying to click on a submenu
if(mList[mLastHighlightedMenuIdx].text[1] != 1)
{
//yep, so abort
return;
}
}
Parent::onMouseDown(event);
}
void GuiPopupMenuTextListCtrl::onMouseUp(const GuiEvent &event)
{
if (mLastHighlightedMenuIdx != -1)
{
//See if we're trying to click on a submenu
if (mList[mLastHighlightedMenuIdx].text[1] != 1)
{
//yep, so abort
return;
}
}
Parent::onMouseUp(event);
S32 selectionIndex = getSelectedCell().y;