WowAddons

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

atlastextureAtlas

GetBlendMode

blendMode = self:GetBlendMode()

Returns

blendModeBlendMode

GetDesaturation

desaturation = self:GetDesaturation()

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

desaturationnormalizedValue

GetHorizTile

tiling = self:GetHorizTile()

Returns

tilingbool

GetRadialProgressBarEndOffset

offset = self:GetRadialProgressBarEndOffset()

Returns the end angle offset of the radial progress bar as a normalized value (0 to 1).

Returns

offsetnormalizedValue

GetRadialProgressBarFeather

feather = self:GetRadialProgressBarFeather()

Returns the feather/blur amount applied to the radial progress bar edge.

Returns

feathernormalizedValue

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

percentnormalizedValue

GetRadialProgressBarReverse

reverse = self:GetRadialProgressBarReverse()

Returns whether the radial progress bar fills in reverse (counterclockwise) direction.

Returns

reversebool

GetRadialProgressBarStartOffset

offset = self:GetRadialProgressBarStartOffset()

Returns the start angle offset of the radial progress bar as a normalized value (0 to 1).

Returns

offsetnormalizedValue

GetRotation

radians, normalizedRotationPoint = self:GetRotation()

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

radiansnumber
normalizedRotationPointvector2

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

ulXnumber
ulYnumber
llXnumber
llYnumber
urXnumber
urYnumber
lrXnumber
lrYnumber

GetTexelSnappingBias

bias = self:GetTexelSnappingBias()

Returns

biasnormalizedValue

GetTexture

textureFile = self:GetTexture()

Returns

textureFilecstring may be nil

GetTextureFileID

textureFile = self:GetTextureFileID()

Returns

textureFilefileID

GetTextureFilePath

textureFile = self:GetTextureFilePath()

Returns

textureFilecstring may be nil

GetTextureSliceMargins

left, top, right, bottom = self:GetTextureSliceMargins()

May return nothing.

Returns

leftnumber
topnumber
rightnumber
bottomnumber

GetTextureSliceMode

sliceMode = self:GetTextureSliceMode()

May return nothing.

Returns

sliceModeUITextureSliceMode

GetVertTile

tiling = self:GetVertTile()

Returns

tilingbool

GetVertexOffset

offsetX, offsetY = self:GetVertexOffset(vertexIndex)

Arguments

vertexIndexluaIndex

Returns

offsetXuiUnit
offsetYuiUnit

IsBlockingLoadRequested

blocking = self:IsBlockingLoadRequested()

Returns

blockingbool

IsDesaturated

desaturated = self:IsDesaturated()

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

desaturatedbool

IsSnappingToPixelGrid

snap = self:IsSnappingToPixelGrid()

Returns

snapbool

ResetTexCoord

self:ResetTexCoord()

SetAtlas

self:SetAtlas(atlas, [useAtlasSize], [filterMode], [resetTexCoords], [wrapModeHorizontal], [wrapModeVertical])

Arguments

atlastextureAtlas
useAtlasSizebool default false
filterModeFilterMode may be nil
resetTexCoordsbool may be nil
wrapModeHorizontalcstring may be nil
wrapModeVerticalcstring may be nil

SetBlendMode

self:SetBlendMode(blendMode)

Arguments

blendModeBlendMode

SetBlockingLoadsRequested

self:SetBlockingLoadsRequested([blocking])

Arguments

blockingbool default false

SetColorTexture

self:SetColorTexture(colorR, colorG, colorB, [a])

Arguments

colorRnumber
colorGnumber
colorBnumber
aSingleColorValue may be nil

SetDesaturated

self:SetDesaturated([desaturated])

Arguments

desaturatedbool default false

SetDesaturation

self:SetDesaturation(desaturation)

Arguments

desaturationnormalizedValue

SetGradient

self:SetGradient(orientation, minColor, maxColor)

Arguments

orientationOrientation
minColorcolorRGBA
maxColorcolorRGBA

SetHorizTile

self:SetHorizTile([tiling])

Arguments

tilingbool default false

SetMask

self:SetMask(file)

Arguments

filecstring

SetRadialProgressBarEndOffset

self:SetRadialProgressBarEndOffset(offset)

Sets the end angle offset of the radial progress bar as a normalized value (0 to 1).

Arguments

offsetnormalizedValue

SetRadialProgressBarFeather

self:SetRadialProgressBarFeather(feather)

Sets the feather/blur amount applied to the radial progress bar edge (higher = more gradual falloff).

Arguments

feathernormalizedValue

SetRadialProgressBarPercent

self:SetRadialProgressBarPercent(percent)

Sets the fill percentage of the radial progress bar (0 to 1).

Arguments

percentnormalizedValue

SetRadialProgressBarReverse

self:SetRadialProgressBarReverse(reverse)

Sets whether the radial progress bar fills in reverse (counterclockwise) direction.

Arguments

reversebool

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

offsetnormalizedValue

SetRotation

self:SetRotation(radians, [normalizedRotationPoint])

Arguments

radiansnumber
normalizedRotationPointvector2 may be nil

SetSVG

success = self:SetSVG(svgAsset)

Arguments

svgAssetFileAsset

Returns

successbool

SetSnapToPixelGrid

self:SetSnapToPixelGrid([snap])

Arguments

snapbool default false

SetSpriteSheetCell

self:SetSpriteSheetCell(cell, numRows, numColumns, [cellWidth], [cellHeight])

Arguments

cellluaIndex
numRowsnumber
numColumnsnumber
cellWidthnumber may be nil
cellHeightnumber may be nil

SetTexCoord

self:SetTexCoord(left, right, bottom, top)

Arguments

leftnumber
rightnumber
bottomnumber
topnumber

SetTexelSnappingBias

self:SetTexelSnappingBias(bias)

Arguments

biasnormalizedValue

SetTexture

success = self:SetTexture([textureAsset], [wrapModeHorizontal], [wrapModeVertical], [filterMode])

Arguments

textureAssetcstring may be nil
wrapModeHorizontalcstring may be nil
wrapModeVerticalcstring may be nil
filterModecstring may be nil

Returns

successbool

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

leftnumber
topnumber
rightnumber
bottomnumber

SetTextureSliceMode

self:SetTextureSliceMode(sliceMode)

Controls whether the center and sides are Stretched or Tiled when using nineslice texture rendering. Defaults to Stretched.

Arguments

sliceModeUITextureSliceMode

SetVertTile

self:SetVertTile([tiling])

Arguments

tilingbool default false

SetVertexOffset

self:SetVertexOffset(vertexIndex, offsetX, offsetY)

Arguments

vertexIndexluaIndex
offsetXuiUnit
offsetYuiUnit

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows