mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-06-23 05:44:25 +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
|
|
@ -131,15 +131,31 @@ GuiProgressBitmapCtrl::GuiProgressBitmapCtrl()
|
|||
void GuiProgressBitmapCtrl::initPersistFields()
|
||||
{
|
||||
docsURL;
|
||||
INITPERSISTFIELD_IMAGEASSET(Bitmap, GuiProgressBitmapCtrl, "Bitmap file to use for rendering the progress bar.\n\n"
|
||||
ADD_FIELD("bitmapAsset", TypeImageAssetRef, Offset(mBitmapAssetRef, GuiProgressBitmapCtrl))
|
||||
.doc("Bitmap asset to use for rendering the progress bar.\n\n"
|
||||
"If the profile assigned to the control already has a bitmap assigned, this property need not be "
|
||||
"set in which case the bitmap from the profile is used.");
|
||||
|
||||
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void GuiProgressBitmapCtrl::_setBitmap(StringTableEntry _in)
|
||||
{
|
||||
if (mBitmapAssetRef.assetId == _in)
|
||||
return;
|
||||
|
||||
if (ImageAsset::isNamedTarget(_in))
|
||||
{
|
||||
mBitmapAssetRef.assetId = _in;
|
||||
mBitmapAssetRef.assetPtr = ImageAsset::getNamedTargetAssetPtr(_in);
|
||||
return;
|
||||
}
|
||||
|
||||
mBitmapAssetRef = _in;
|
||||
}
|
||||
|
||||
void GuiProgressBitmapCtrl::setBitmap( const char* name )
|
||||
{
|
||||
bool awake = mAwake;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue