Menu
Lumberyard
Developer Guide (Version 1.11)

UIImageComponent

Controls sprites, images, and textures.

UiImageBus

Services messages for the UiImageComponent.

GetColor

Returns the color tint for the image.

Syntax

Copy
AZ::Color GetColor()

SetColor

Sets the color tint for the image.

Syntax

Copy
void SetColor(const AZ::Color& color)

GetSpritePathname

Returns the source location of the image to be displayed by the element.

Syntax

Copy
AZStd::string GetSpritePathname()

SetSpritePathname

Sets the source location of the image to be displayed by the element.

Syntax

Copy
void SetSpritePathname(AZStd::string spritePath)

GetRenderTargetName

Returns the name of the render target associated with the sprite.

Syntax

Copy
AZStd::string GetRenderTargetName()

SetRenderTargetName

Sets the name of the render target associated with the sprite.

Syntax

Copy
void SetRenderTargetName(AZStd::string renderTargetName)

GetSpriteType

Returns the type of the sprite.

Syntax

Copy
eUiSpriteType GetSpriteType()

Possible sprite types are as follows.

Copy
enum eUiSpriteType { eUiSpriteType_SpriteAsset, eUiSpriteType_RenderTarget };

SetSpriteType

Sets the type of the sprite.

Syntax

Copy
void SetSpriteType(eUiSpriteType spriteType)

For possible sprite types, see GetSpriteType.

GetImageType

Returns the type of the image. Affects how the texture or sprite is mapped to the image rectangle.

Syntax

Copy
eUiImageType GetImageType()

Possible values for eUiImageType are as follows.

Copy
enum eUiImageType { eUiImageType_Stretched, eUiImageType_Sliced, eUiImageType_Fixed, eUiImageType_Tiled, eUiImageType_StretchedToFit, eUiImageType_StretchedToFill };

SetImageType

Sets the type of the image. Affects how the texture or sprite is mapped to the image rectangle.

Syntax

Copy
void SetImageType(eUiImageType imageType)

For possible values for eUiImageType, see GetImageType.

On this page: