mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Tabs&Spaces
This commit is contained in:
parent
f237caff5e
commit
937ef6c33d
1 changed files with 13 additions and 13 deletions
|
|
@ -134,7 +134,7 @@ GuiCanvas::GuiCanvas(): GuiControl(),
|
||||||
mPlatformWindow(NULL),
|
mPlatformWindow(NULL),
|
||||||
mDisplayWindow(true),
|
mDisplayWindow(true),
|
||||||
mMenuBarCtrl(nullptr),
|
mMenuBarCtrl(nullptr),
|
||||||
mMenuBackground(nullptr)
|
mMenuBackground(nullptr)
|
||||||
{
|
{
|
||||||
setBounds(0, 0, 640, 480);
|
setBounds(0, 0, 640, 480);
|
||||||
mAwake = true;
|
mAwake = true;
|
||||||
|
|
@ -297,11 +297,11 @@ void GuiCanvas::setMenuBar(SimObject *obj)
|
||||||
mMenuBarCtrl = dynamic_cast<GuiControl*>(obj);
|
mMenuBarCtrl = dynamic_cast<GuiControl*>(obj);
|
||||||
|
|
||||||
//remove old menubar
|
//remove old menubar
|
||||||
if (oldMenuBar)
|
if (oldMenuBar)
|
||||||
{
|
{
|
||||||
Parent::removeObject(oldMenuBar);
|
Parent::removeObject(oldMenuBar);
|
||||||
Parent::removeObject(mMenuBackground); //also remove the modeless wrapper
|
Parent::removeObject(mMenuBackground); //also remove the modeless wrapper
|
||||||
}
|
}
|
||||||
|
|
||||||
// set new menubar
|
// set new menubar
|
||||||
if (mMenuBarCtrl)
|
if (mMenuBarCtrl)
|
||||||
|
|
@ -316,15 +316,15 @@ void GuiCanvas::setMenuBar(SimObject *obj)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mMenuBackground == nullptr)
|
if (mMenuBackground == nullptr)
|
||||||
{
|
{
|
||||||
mMenuBackground = new GuiControl();
|
mMenuBackground = new GuiControl();
|
||||||
mMenuBackground->registerObject();
|
mMenuBackground->registerObject();
|
||||||
|
|
||||||
mMenuBackground->setControlProfile(profile);
|
mMenuBackground->setControlProfile(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
mMenuBackground->addObject(mMenuBarCtrl);
|
mMenuBackground->addObject(mMenuBarCtrl);
|
||||||
|
|
||||||
Parent::addObject(mMenuBackground);
|
Parent::addObject(mMenuBackground);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue