mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-08 13:14:33 +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
|
|
@ -354,7 +354,10 @@ void GuiPopUpMenuCtrlEx::initPersistFields(void)
|
|||
addField("sbUsesNAColor", TypeBool, Offset(mRenderScrollInNA, GuiPopUpMenuCtrlEx), "Deprecated" "@internal");
|
||||
addField("reverseTextList", TypeBool, Offset(mReverseTextList, GuiPopUpMenuCtrlEx), "Reverses text list if popup extends up, instead of down");
|
||||
|
||||
addProtectedField("BitmapAsset", TypeImageAssetPtr, Offset(mBitmapAsset, GuiPopUpMenuCtrlEx), _setBitmaps, &defaultProtectedGetFn, "@brief ""Bitmap"" ""asset \"Name of bitmap asset to use\".");
|
||||
ADD_FIELD("bitmapAsset", TypeImageAssetRef, Offset(mBitmapAssetRef, GuiPopUpMenuCtrlEx))
|
||||
.elements(NumBitmapModes)
|
||||
.onSet(_setBitmaps)
|
||||
.doc("@brief ""Bitmap"" ""asset \"Name of bitmap asset to use\".");
|
||||
|
||||
addField("bitmapBounds", TypePoint2I, Offset(mBitmapBounds, GuiPopUpMenuCtrlEx), "Boundaries of bitmap displayed");
|
||||
addField("hotTrackCallback", TypeBool, Offset(mHotTrackItems, GuiPopUpMenuCtrlEx),
|
||||
|
|
@ -807,18 +810,18 @@ void GuiPopUpMenuCtrlEx::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