mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-08 21:24:34 +00:00
Updates ImageAsset usage to utilize AssetRef, and standardizes the setter/getter functions and naming conventions, as well as the ability to use and bind named targets.
This commit is contained in:
parent
a858d8624e
commit
34e3f78a22
82 changed files with 1451 additions and 951 deletions
|
|
@ -299,7 +299,10 @@ void GuiPopUpMenuCtrl::initPersistFields(void)
|
|||
addField("sbUsesNAColor", TypeBool, Offset(mRenderScrollInNA, GuiPopUpMenuCtrl));
|
||||
addField("reverseTextList", TypeBool, Offset(mReverseTextList, GuiPopUpMenuCtrl));
|
||||
|
||||
addProtectedField("BitmapAsset", TypeImageAssetPtr, Offset(mBitmapAsset, GuiPopUpMenuCtrl), _setBitmaps, &defaultProtectedGetFn, "@brief ""Bitmap"" ""asset \"\".");
|
||||
ADD_FIELD("bitmapAsset", TypeImageAssetRef, Offset(mBitmapAssetRef, GuiPopUpMenuCtrl))
|
||||
.elements(NumBitmapModes)
|
||||
.onSet(_setBitmaps)
|
||||
.doc("@brief ""Bitmap"" ""asset \"\".");
|
||||
|
||||
addField("bitmapBounds", TypePoint2I, Offset(mBitmapBounds, GuiPopUpMenuCtrl));
|
||||
|
||||
|
|
@ -580,18 +583,18 @@ void GuiPopUpMenuCtrl::setBitmap( const char *name )
|
|||
|
||||
dStrcpy(p, "_n", pLen);
|
||||
|
||||
_setBitmap((StringTableEntry)buffer, Normal);
|
||||
setBitmap((StringTableEntry)buffer, Normal);
|
||||
|
||||
dStrcpy(p, "_d", pLen);
|
||||
_setBitmap((StringTableEntry)buffer, Depressed);
|
||||
setBitmap((StringTableEntry)buffer, Depressed);
|
||||
|
||||
if ( mBitmapAsset[Depressed].isNull() )
|
||||
mBitmapAsset[Depressed] = mBitmapAsset[Normal];
|
||||
if ( mBitmapAssetRef[Depressed].isNull() )
|
||||
mBitmapAssetRef[Depressed] = mBitmapAssetRef[Normal];
|
||||
}
|
||||
else
|
||||
{
|
||||
_setBitmap(StringTable->EmptyString(), Normal);
|
||||
_setBitmap(StringTable->EmptyString(), Depressed);
|
||||
setBitmap(StringTable->EmptyString(), Normal);
|
||||
setBitmap(StringTable->EmptyString(), Depressed);
|
||||
}
|
||||
setUpdate();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue