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:
JeffR 2026-06-16 17:39:30 -05:00
parent a858d8624e
commit 34e3f78a22
82 changed files with 1451 additions and 951 deletions

View file

@ -72,9 +72,9 @@ protected:
Point2F mRange; ///< When working as a slider, this sets our min/max range
//Keybind option
DECLARE_IMAGEASSET(GuiGameSettingsCtrl, KeybindBitmap, GFXDefaultGUIProfile)
DECLARE_IMAGEASSET(GuiGameSettingsCtrl, PreviousBitmap, GFXDefaultGUIProfile)
DECLARE_IMAGEASSET(GuiGameSettingsCtrl, NextBitmap, GFXDefaultGUIProfile)
AssetRef<ImageAsset> mKeybindBitmapAssetRef;
AssetRef<ImageAsset> mPreviousBitmapAssetRef;
AssetRef<ImageAsset> mNextBitmapAssetRef;
S32 mArrowSize;
S32 mColumnSplit; //Padding between the leftmost edge of the control, and the left side of the 'option'.
@ -84,7 +84,19 @@ protected:
bool mSelected;
public:
/// Sets the control as selected . Only controls that are enabled can be selected.
void setKeybindBitmap(StringTableEntry _in);
inline StringTableEntry getKeybindBitmapAssetId() const { return mKeybindBitmapAssetRef.getAssetId(); }
GFXTexHandle getKeybindBitmap() { return mKeybindBitmapAssetRef.notNull() ? mKeybindBitmapAssetRef.assetPtr->getTexture(&GFXDefaultGUIProfile) : NULL; }
void setPreviousBitmap(StringTableEntry _in);
inline StringTableEntry getPreviousBitmapAssetId() const { return mPreviousBitmapAssetRef.getAssetId(); }
GFXTexHandle getPreviousBitmap() { return mPreviousBitmapAssetRef.notNull() ? mPreviousBitmapAssetRef.assetPtr->getTexture(&GFXDefaultGUIProfile) : NULL; }
void setNextBitmap(StringTableEntry _in);
inline StringTableEntry getNextBitmapAssetId() const { return mNextBitmapAssetRef.getAssetId(); }
GFXTexHandle getNextBitmap() { return mNextBitmapAssetRef.notNull() ? mNextBitmapAssetRef.assetPtr->getTexture(&GFXDefaultGUIProfile) : NULL; }
/// Sets the control as selected . Only controls that are enabled can be selected.
virtual void setSelected();
/// Determines if the specified control is enabled or disabled.