mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Cleans up removal/deletion logic
This commit is contained in:
parent
4f399eb87f
commit
192862ba6d
2 changed files with 12 additions and 5 deletions
|
|
@ -704,11 +704,9 @@ bool GuiPopUpMenuCtrlEx::onWake()
|
|||
|
||||
void GuiPopUpMenuCtrlEx::onRemove()
|
||||
{
|
||||
mBackground = nullptr;
|
||||
mSearchEdit = nullptr;
|
||||
mTl = nullptr;
|
||||
mSc = nullptr;
|
||||
mBackground = nullptr;
|
||||
removeChildren();
|
||||
|
||||
Parent::onRemove();
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
bool GuiPopUpMenuCtrlEx::onAdd()
|
||||
|
|
@ -1637,6 +1635,14 @@ void GuiPopUpMenuCtrlEx::addChildren()
|
|||
mBackground->addObject(mSearchEdit);
|
||||
}
|
||||
|
||||
void GuiPopUpMenuCtrlEx::removeChildren()
|
||||
{
|
||||
mTl->deleteObject();
|
||||
mSc->deleteObject();
|
||||
mSearchEdit->deleteObject();
|
||||
mBackground->deleteObject();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void GuiPopUpMenuCtrlEx::repositionPopup()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue