mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Tabs&Spaces
This commit is contained in:
parent
40fff8ef50
commit
4d10f02890
|
|
@ -134,7 +134,7 @@ GuiCanvas::GuiCanvas(): GuiControl(),
|
|||
mPlatformWindow(NULL),
|
||||
mDisplayWindow(true),
|
||||
mMenuBarCtrl(nullptr),
|
||||
mMenuBackground(nullptr)
|
||||
mMenuBackground(nullptr)
|
||||
{
|
||||
setBounds(0, 0, 640, 480);
|
||||
mAwake = true;
|
||||
|
|
@ -297,11 +297,11 @@ void GuiCanvas::setMenuBar(SimObject *obj)
|
|||
mMenuBarCtrl = dynamic_cast<GuiControl*>(obj);
|
||||
|
||||
//remove old menubar
|
||||
if (oldMenuBar)
|
||||
{
|
||||
Parent::removeObject(oldMenuBar);
|
||||
Parent::removeObject(mMenuBackground); //also remove the modeless wrapper
|
||||
}
|
||||
if (oldMenuBar)
|
||||
{
|
||||
Parent::removeObject(oldMenuBar);
|
||||
Parent::removeObject(mMenuBackground); //also remove the modeless wrapper
|
||||
}
|
||||
|
||||
// set new menubar
|
||||
if (mMenuBarCtrl)
|
||||
|
|
@ -316,15 +316,15 @@ void GuiCanvas::setMenuBar(SimObject *obj)
|
|||
return;
|
||||
}
|
||||
|
||||
if (mMenuBackground == nullptr)
|
||||
{
|
||||
mMenuBackground = new GuiControl();
|
||||
mMenuBackground->registerObject();
|
||||
if (mMenuBackground == nullptr)
|
||||
{
|
||||
mMenuBackground = new GuiControl();
|
||||
mMenuBackground->registerObject();
|
||||
|
||||
mMenuBackground->setControlProfile(profile);
|
||||
}
|
||||
mMenuBackground->setControlProfile(profile);
|
||||
}
|
||||
|
||||
mMenuBackground->addObject(mMenuBarCtrl);
|
||||
mMenuBackground->addObject(mMenuBarCtrl);
|
||||
|
||||
Parent::addObject(mMenuBackground);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue