mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-27 18:43:48 +00:00
update macro
Added get##name##File to macro that will check to make sure the asset is not null before getting the image file.
This commit is contained in:
parent
a52069bbc5
commit
aa3f07e339
5 changed files with 13 additions and 9 deletions
|
|
@ -138,6 +138,8 @@ private: AssetPtr<ImageAsset> mBitmapAsset; public: void _setBitmap(StringTableE
|
|||
} static bool _setBitmapData(void* obj, const char* index, const char* data) {
|
||||
static_cast<GuiBitmapButtonCtrl*>(obj)->_setBitmap(_getStringTable()->insert(data)); return false;
|
||||
}
|
||||
StringTableEntry getBitmapFile() { return mBitmapAsset.notNull() ? mBitmapAsset->getImageFile() : ""; }
|
||||
|
||||
protected:
|
||||
|
||||
void onAssetRefreshed(AssetPtrBase* pAssetPtrBase) override
|
||||
|
|
|
|||
|
|
@ -701,7 +701,7 @@ DefineEngineMethod( GuiControlProfile, getStringWidth, S32, (const char* string)
|
|||
|
||||
DefineEngineMethod(GuiControlProfile, getBitmap, const char*, (), , "get name")
|
||||
{
|
||||
return object->getBitmapAsset()->getImageFile();
|
||||
return object->getBitmapFile();
|
||||
}
|
||||
DefineEngineMethod(GuiControlProfile, getBitmapAsset, const char*, (), , "")
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue