GameTooltip:AddTexture
Jump to navigation
Jump to search
Adds a texture (icon) to the beginning of the last line added by AddLine(), AddDoubleLine(), etc.
GameTooltip:AddTexture(UITextureAsset [, minx, maxx, miny, maxy]) GameTooltip:AddTexture(UITextureAsset [, textureInfoTable])
Arguments
- UITextureAsset
- number - FileDataID or texture path
- textureInfoTable
- TooltipTextureInfo?
Key | Type | Description |
---|---|---|
width | number | can be 0 to use actual texture width |
height | number | can be 0 to use actual texture width |
anchor | number | Enum.TooltipTextureAnchor |
region | number | Enum.TooltipTextureRelativeRegion |
verticalOffset | number | |
margin | table | left, right, top, bottom ; empty space around the texture, can be negative
|
texCoords | table | left, right, top, bottom
|
vertexColor | table | r, g, b, a
|
Defaults
These are the internal defaults. The table may be partially filled out and any unspecified settings will be used at their default values.
{
width = 12,
height = 12,
anchor = Enum.TooltipTextureAnchor.LeftTop,
region = Enum.TooltipTextureRelativeRegion.LeftLine,
verticalOffset = 0,
margin = { left = 8, right = 8, top = 0, bottom = 0 },
texCoords = { left = 0, right = 1, top = 0, bottom = 1 },
vertexColor = { r = 1, g = 1, b = 1, a = 1 },
}
Example
GameTooltip:AddTexture(134532, {width = 32, height = 32})
Enums
Value | Field | Description |
---|---|---|
LeftTop | ||
LeftCenter | ||
LeftBottom | ||
RightTop | ||
RightCenter | ||
RightBottom | ||
All |
Value | Field | Description |
---|---|---|
LeftLine | ||
RightLine | GameTooltip:AddDoubleLine |
Details
- There is a limit of 10 textures per tooltip line (as seen in GameTooltipTemplate.xml). You can get around this limitation by using
GameTooltip:AddLine("|T"..itemTexture..":0|t ")
Patch changes
- Patch 8.2.0 (2019-06-25): now supports multiple customizable textures per line.
- Kaivax 2019-06-19. UI Changes in Rise of Azshara.
- Kaivax 2019-06-19. UI Changes in Rise of Azshara.