mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 03:45:26 +00:00
Fixes the menubar functionality when using SDL.
This resolves menu order, cleanup and close/re-open issues, as well as crashes on close. It also modifies the look slightly to look closer to the windows menubar to keep a cohesive look regardless of platform.
This commit is contained in:
parent
63ae781d24
commit
b614d87e78
7 changed files with 151 additions and 75 deletions
|
|
@ -133,7 +133,7 @@ public:
|
|||
GuiSubmenuBackgroundCtrl *mSubmenuBackground; // Background for a submenu
|
||||
GuiMenuTextListCtrl *mSubmenuTextList; // Text list for a submenu
|
||||
|
||||
Menu *menuList;
|
||||
Vector<Menu*> mMenuList;
|
||||
Menu *mouseDownMenu;
|
||||
Menu *mouseOverMenu;
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ public:
|
|||
// internal menu handling functions
|
||||
// these are used by the script manipulation functions to add/remove/change menu items
|
||||
static Menu* sCreateMenu(const char *menuText, U32 menuId);
|
||||
void addMenu(Menu *menu);
|
||||
void addMenu(Menu *menu, S32 pos = -1);
|
||||
void addMenu(const char *menuText, U32 menuId);
|
||||
Menu *findMenu(const char *menu); // takes either a menu text or a string id
|
||||
static MenuItem *findMenuItem(Menu *menu, const char *menuItem); // takes either a menu text or a string id
|
||||
|
|
@ -175,6 +175,9 @@ public:
|
|||
static void clearMenuItems(Menu *menu);
|
||||
void clearMenus();
|
||||
|
||||
void attachToMenuBar(Menu* menu, S32 pos = -1);
|
||||
void removeFromMenuBar(Menu* menu);
|
||||
|
||||
// Methods to deal with submenus
|
||||
static MenuItem* findSubmenuItem(Menu *menu, const char *menuItem, const char *submenuItem);
|
||||
static MenuItem* findSubmenuItem(MenuItem *menuItem, const char *submenuItem);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue