mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Stabilizes the add/remove behavior of menubars by also tracking the modeless background control the menubars use for proper cleanup as well.
Also fixes an issue where the findMenu call wasn't properly translating the incoming string to StringTableEntry.
This commit is contained in:
parent
cfbdf63cd7
commit
40fff8ef50
3 changed files with 19 additions and 10 deletions
|
|
@ -1519,9 +1519,10 @@ DefineConsoleMethod(GuiMenuBar, insert, void, (SimObject* pObject, S32 pos), (nu
|
|||
object->insert(pObject, pos);
|
||||
}
|
||||
|
||||
DefineConsoleMethod(GuiMenuBar, findMenu, S32, (StringTableEntry barTitle), (""), "(barTitle)")
|
||||
DefineConsoleMethod(GuiMenuBar, findMenu, S32, (const char* barTitle), (""), "(barTitle)")
|
||||
{
|
||||
PopupMenu* menu = object->findMenu(barTitle);
|
||||
StringTableEntry barTitleStr = StringTable->insert(barTitle);
|
||||
PopupMenu* menu = object->findMenu(barTitleStr);
|
||||
|
||||
if (menu)
|
||||
return menu->getId();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue