World of Warcraft Forever API · SimpleTextureBaseAPI.md, for your AI
SimpleTextureBaseAPI (widget methods)
52 functions, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
ClearRadialProgressBar
self:ClearRadialProgressBar()
Disable radial progress bar rendering and restore standard texture display.
ClearSVG
self:ClearSVG()
ClearTextureSlice
self:ClearTextureSlice()
Disable shader based nineslice texture rendering. Since SetAtlas will automatically load slice data for the atlas from the DB, can be useful if you want to disable nineslice after setting an atlas.
ClearVertexOffsets
self:ClearVertexOffsets()
GetAtlas
atlas = self:GetAtlas()
Returns
atlas | textureAtlas |
|---|
GetBlendMode
blendMode = self:GetBlendMode()
Returns
blendMode | BlendMode |
|---|
GetDesaturation
desaturation = self:GetDesaturation()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
desaturation | normalizedValue |
|---|
GetHorizTile
tiling = self:GetHorizTile()
Returns
tiling | bool |
|---|
GetRadialProgressBarEndOffset
offset = self:GetRadialProgressBarEndOffset()
Returns the end angle offset of the radial progress bar as a normalized value (0 to 1).
Returns
offset | normalizedValue |
|---|
GetRadialProgressBarFeather
feather = self:GetRadialProgressBarFeather()
Returns the feather/blur amount applied to the radial progress bar edge.
Returns
feather | normalizedValue |
|---|
GetRadialProgressBarPercent
percent = self:GetRadialProgressBarPercent()
Returns the fill percentage of the radial progress bar (0 to 1).
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
percent | normalizedValue |
|---|
GetRadialProgressBarReverse
reverse = self:GetRadialProgressBarReverse()
Returns whether the radial progress bar fills in reverse (counterclockwise) direction.
Returns
reverse | bool |
|---|
GetRadialProgressBarStartOffset
offset = self:GetRadialProgressBarStartOffset()
Returns the start angle offset of the radial progress bar as a normalized value (0 to 1).
Returns
offset | normalizedValue |
|---|
GetRotation
radians, normalizedRotationPoint = self:GetRotation()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
radians | number | |
|---|---|---|
normalizedRotationPoint | vector2 |
GetTexCoord
ulX, ulY, llX, llY, urX, urY, lrX, lrY = self:GetTexCoord()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
ulX | number | |
|---|---|---|
ulY | number | |
llX | number | |
llY | number | |
urX | number | |
urY | number | |
lrX | number | |
lrY | number |
GetTexelSnappingBias
bias = self:GetTexelSnappingBias()
Returns
bias | normalizedValue |
|---|
GetTexture
textureFile = self:GetTexture()
Returns
textureFile | cstring may be nil |
|---|
GetTextureFileID
textureFile = self:GetTextureFileID()
Returns
textureFile | fileID |
|---|
GetTextureFilePath
textureFile = self:GetTextureFilePath()
Returns
textureFile | cstring may be nil |
|---|
GetTextureSliceMargins
left, top, right, bottom = self:GetTextureSliceMargins()
May return nothing.
Returns
left | number | |
|---|---|---|
top | number | |
right | number | |
bottom | number |
GetTextureSliceMode
sliceMode = self:GetTextureSliceMode()
May return nothing.
Returns
sliceMode | UITextureSliceMode |
|---|
GetVertTile
tiling = self:GetVertTile()
Returns
tiling | bool |
|---|
GetVertexOffset
offsetX, offsetY = self:GetVertexOffset(vertexIndex)
Arguments
vertexIndex | luaIndex |
|---|
Returns
offsetX | uiUnit | |
|---|---|---|
offsetY | uiUnit |
IsBlockingLoadRequested
blocking = self:IsBlockingLoadRequested()
Returns
blocking | bool |
|---|
IsDesaturated
desaturated = self:IsDesaturated()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
desaturated | bool |
|---|
IsSnappingToPixelGrid
snap = self:IsSnappingToPixelGrid()
Returns
snap | bool |
|---|
ResetTexCoord
self:ResetTexCoord()
SetAtlas
self:SetAtlas(atlas, [useAtlasSize], [filterMode], [resetTexCoords], [wrapModeHorizontal], [wrapModeVertical])
Arguments
atlas | textureAtlas | |
|---|---|---|
useAtlasSize | bool default false | |
filterMode | FilterMode may be nil | |
resetTexCoords | bool may be nil | |
wrapModeHorizontal | cstring may be nil | |
wrapModeVertical | cstring may be nil |
SetBlendMode
self:SetBlendMode(blendMode)
Arguments
blendMode | BlendMode |
|---|
SetBlockingLoadsRequested
self:SetBlockingLoadsRequested([blocking])
Arguments
blocking | bool default false |
|---|
SetColorTexture
self:SetColorTexture(colorR, colorG, colorB, [a])
Arguments
colorR | number | |
|---|---|---|
colorG | number | |
colorB | number | |
a | SingleColorValue may be nil |
SetDesaturated
self:SetDesaturated([desaturated])
Arguments
desaturated | bool default false |
|---|
SetDesaturation
self:SetDesaturation(desaturation)
Arguments
desaturation | normalizedValue |
|---|
SetGradient
self:SetGradient(orientation, minColor, maxColor)
Arguments
orientation | Orientation | |
|---|---|---|
minColor | colorRGBA | |
maxColor | colorRGBA |
SetHorizTile
self:SetHorizTile([tiling])
Arguments
tiling | bool default false |
|---|
SetMask
self:SetMask(file)
Arguments
file | cstring |
|---|
SetRadialProgressBarEndOffset
self:SetRadialProgressBarEndOffset(offset)
Sets the end angle offset of the radial progress bar as a normalized value (0 to 1).
Arguments
offset | normalizedValue |
|---|
SetRadialProgressBarFeather
self:SetRadialProgressBarFeather(feather)
Sets the feather/blur amount applied to the radial progress bar edge (higher = more gradual falloff).
Arguments
feather | normalizedValue |
|---|
SetRadialProgressBarPercent
self:SetRadialProgressBarPercent(percent)
Sets the fill percentage of the radial progress bar (0 to 1).
Arguments
percent | normalizedValue |
|---|
SetRadialProgressBarReverse
self:SetRadialProgressBarReverse(reverse)
Sets whether the radial progress bar fills in reverse (counterclockwise) direction.
Arguments
reverse | bool |
|---|
SetRadialProgressBarStartOffset
self:SetRadialProgressBarStartOffset(offset)
Sets the start angle offset of the radial progress bar as a normalized value (0 to 1), where 0 is at the bottom.
Arguments
offset | normalizedValue |
|---|
SetRotation
self:SetRotation(radians, [normalizedRotationPoint])
Arguments
radians | number | |
|---|---|---|
normalizedRotationPoint | vector2 may be nil |
SetSVG
success = self:SetSVG(svgAsset)
Arguments
svgAsset | FileAsset |
|---|
Returns
success | bool |
|---|
SetSnapToPixelGrid
self:SetSnapToPixelGrid([snap])
Arguments
snap | bool default false |
|---|
SetSpriteSheetCell
self:SetSpriteSheetCell(cell, numRows, numColumns, [cellWidth], [cellHeight])
Arguments
cell | luaIndex | |
|---|---|---|
numRows | number | |
numColumns | number | |
cellWidth | number may be nil | |
cellHeight | number may be nil |
SetTexCoord
self:SetTexCoord(left, right, bottom, top)
Arguments
left | number | |
|---|---|---|
right | number | |
bottom | number | |
top | number |
SetTexelSnappingBias
self:SetTexelSnappingBias(bias)
Arguments
bias | normalizedValue |
|---|
SetTexture
success = self:SetTexture([textureAsset], [wrapModeHorizontal], [wrapModeVertical], [filterMode])
Arguments
textureAsset | cstring may be nil | |
|---|---|---|
wrapModeHorizontal | cstring may be nil | |
wrapModeVertical | cstring may be nil | |
filterMode | cstring may be nil |
Returns
success | bool |
|---|
SetTextureSliceMargins
self:SetTextureSliceMargins(left, top, right, bottom)
Enables nineslice texture rendering using the specified pixel margins. Preferred over legacy nineslice approach that uses 9 separate textures.
Arguments
left | number | |
|---|---|---|
top | number | |
right | number | |
bottom | number |
SetTextureSliceMode
self:SetTextureSliceMode(sliceMode)
Controls whether the center and sides are Stretched or Tiled when using nineslice texture rendering. Defaults to Stretched.
Arguments
sliceMode | UITextureSliceMode |
|---|
SetVertTile
self:SetVertTile([tiling])
Arguments
tiling | bool default false |
|---|
SetVertexOffset
self:SetVertexOffset(vertexIndex, offsetX, offsetY)
Arguments
vertexIndex | luaIndex | |
|---|---|---|
offsetX | uiUnit | |
offsetY | uiUnit |