mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 22:24: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
|
|
@ -48,7 +48,7 @@ protected:
|
|||
|
||||
/// Name of the bitmap file. If this is 'texhandle' the bitmap is not loaded
|
||||
/// from a file but rather set explicitly on the control.
|
||||
DECLARE_IMAGEASSET(GuiBitmapCtrl, Bitmap, GFXDefaultGUIProfile)
|
||||
AssetRef<ImageAsset> mBitmapAssetRef;
|
||||
|
||||
Point2I mStartPoint;
|
||||
ColorI mColor;
|
||||
|
|
@ -74,6 +74,11 @@ public:
|
|||
void setBitmap(const char* name, bool resize = true);
|
||||
void setBitmapHandle(GFXTexHandle handle, bool resize = false);
|
||||
|
||||
void _setBitmap(StringTableEntry _in);
|
||||
inline StringTableEntry getBitmapAssetId() const { return mBitmapAssetRef.getAssetId(); }
|
||||
GFXTexHandle getBitmap() { return mBitmapAssetRef.notNull() ? mBitmapAssetRef.assetPtr->getTexture(&GFXDefaultGUIProfile) : NULL; }
|
||||
AssetPtr<ImageAsset> getBitmapAsset() { return mBitmapAssetRef.assetPtr; }
|
||||
|
||||
void updateSizing();
|
||||
|
||||
void onRender(Point2I offset, const RectI& updateRect) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue