class
GUITexture
A GUI element that displays a texture.
Public
Methods
staticGetGuiTypeName
static const String &GetGuiTypeName()
Returns type name of the GUI element used for finding GUI element styles.
SetImage
void SetImage(const HSpriteImage &image)
Changes the active image.
If the provided image is null then the image specified by the style will be used.
staticCreate
static GUIElementType *Create(const ContentType &contents, const String &styleClass, const TInlineArray<GUIOption, 4> &options)
Creates a new GUI element.
- contents
- Structure describing the contents of the GUI element to create.
- styleClass
- Style class that will be used for determining GUI element visuals from the current style sheet. If no class is provided, default style is determined based on GUI element type.
- options
- Additional options that control GUI element size and position. This will override options set in the style sheet.
Internal
Constructors
GUITexture
GUITexture(PrivatelyConstruct, const GUITextureContents &contents, const String &styleName, const GUISizeConstraints &dimensions)
Methods
CalculateUnconstrainedOptimalSize
GUILogicalSize CalculateUnconstrainedOptimalSize() const override
Calculates the optimal size for the GUI element, ignoring size constraints.
GetStyleSheetElement
const char *GetStyleSheetElement() const override
Returns the name of the GUI element type to be used for style lookup in the style sheet.
Protected
Methods
~GUITexture
virtual ~GUITexture() noexcept
UpdateRenderElements
void UpdateRenderElements() override
Recreates the internal render elements.
Must be called before GetRenderElementVertexAndIndexData/FillBuffer if element is dirty. Marks the element as non dirty.
NotifyStyleChanged
void NotifyStyleChanged() override
Method that gets triggered whenever element style changes.
Fields
mBackgroundSprite
GUIBackgroundSprite mBackgroundSprite
mImageSprite
ImageSprite * mImageSprite
mActiveImage
HSpriteImage mActiveImage
mActiveImageSize
GUILogicalSize mActiveImageSize
mImageSpriteInformation
ImageSpriteInformation mImageSpriteInformation
mScaleMode
TextureScaleMode mScaleMode
mTransparent
bool mTransparent
mUsingStyleTexture
bool mUsingStyleTexture