mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Fixes cleanup handling on guiBitmapButtonCtrl and guiGameSettingsCtrl to release the bound textures like other GUI controls when they sleep, avoiding a texture object leak.
Fixes a call for UINavigation to getPageCount that was erroneously referencing the pageStack Fixes fetch and binding of the image for display when using the uvEditor
This commit is contained in:
parent
53aea82614
commit
67d8448915
5 changed files with 35 additions and 2 deletions
|
|
@ -511,8 +511,25 @@ bool GuiGameSettingsCtrl::onWake()
|
|||
if( !Parent::onWake() )
|
||||
return false;
|
||||
|
||||
_setNextBitmap(getNextBitmap());
|
||||
_setPreviousBitmap(getPreviousBitmap());
|
||||
_setKeybindBitmap(getKeybindBitmap());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void GuiGameSettingsCtrl::onSleep()
|
||||
{
|
||||
if (mNextBitmapAsset.notNull())
|
||||
mNextBitmap = NULL;
|
||||
if (mPreviousBitmapAsset.notNull())
|
||||
mPreviousBitmap = NULL;
|
||||
if (mKeybindBitmapAsset.notNull())
|
||||
mKeybindBitmap = NULL;
|
||||
|
||||
Parent::onSleep();
|
||||
}
|
||||
|
||||
void GuiGameSettingsCtrl::activate()
|
||||
{
|
||||
if(isSelected() && isEnabled() && (mScriptCallback != StringTable->EmptyString()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue