WowAddons

World of Warcraft Forever API · SimpleButtonAPI.md, for your AI

SimpleButtonAPI (widget methods)

42 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

ClearDisabledTexture

self:ClearDisabledTexture()

ClearHighlightTexture

self:ClearHighlightTexture()

ClearNormalTexture

self:ClearNormalTexture()

ClearPushedTexture

self:ClearPushedTexture()

Click

self:Click([button], [isDown])

Arguments

buttoncstring default "LeftButton"
isDownbool default false

Disable

self:Disable()

Protected: only Blizzard's own code may call it.

Enable

self:Enable()

Protected: only Blizzard's own code may call it.

GetButtonState

buttonState = self:GetButtonState()

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

Returns

buttonStateSimpleButtonStateToken

GetDisabledFontObject

font = self:GetDisabledFontObject()

Returns

fontSimpleFont

GetDisabledTexture

texture = self:GetDisabledTexture()

Returns

textureSimpleTexture

GetFontString

fontString = self:GetFontString()

Returns

fontStringSimpleFontString

GetHighlightFontObject

font = self:GetHighlightFontObject()

Returns

fontSimpleFont

GetHighlightTexture

texture = self:GetHighlightTexture()

Returns

textureSimpleTexture

GetMotionScriptsWhileDisabled

motionScriptsWhileDisabled = self:GetMotionScriptsWhileDisabled()

Returns

motionScriptsWhileDisabledbool

GetNormalFontObject

font = self:GetNormalFontObject()

Returns

fontSimpleFont

GetNormalTexture

texture = self:GetNormalTexture()

Returns

textureSimpleTexture

GetPushedTextOffset

offsetX, offsetY = self:GetPushedTextOffset()

Returns

offsetXuiUnit
offsetYuiUnit

GetPushedTexture

texture = self:GetPushedTexture()

Returns

textureSimpleTexture

GetText

text = self:GetText()

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

Returns

textcstring

GetTextHeight

height = self:GetTextHeight()

Returns

heightuiUnit

GetTextWidth

width = self:GetTextWidth()

Returns

widthuiUnit

IsEnabled

isEnabled = self:IsEnabled()

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

Returns

isEnabledbool

RegisterForClicks

self:RegisterForClicks(buttons)

Protected: only Blizzard's own code may call it.

Arguments

buttonsClickButton

RegisterForMouse

self:RegisterForMouse(buttons)

Protected: only Blizzard's own code may call it.

Arguments

buttonsClickButton

SetButtonState

self:SetButtonState(buttonState, [lock])

Arguments

buttonStateSimpleButtonStateToken
lockbool default false

SetDisabledAtlas

self:SetDisabledAtlas(atlas)

Arguments

atlastextureAtlas

SetDisabledFontObject

self:SetDisabledFontObject(font)

Arguments

fontSimpleFont

SetDisabledTexture

self:SetDisabledTexture(asset)

Arguments

assetTextureAsset

SetEnabled

self:SetEnabled([enabled])

Protected: only Blizzard's own code may call it.

Arguments

enabledbool default false

SetFontString

self:SetFontString(fontString)

Arguments

fontStringSimpleFontString

SetFormattedText

self:SetFormattedText(text)

Arguments

textcstring

SetHighlightAtlas

self:SetHighlightAtlas(atlas, [blendMode])

Arguments

atlastextureAtlas
blendModeBlendMode may be nil

SetHighlightFontObject

self:SetHighlightFontObject(font)

Arguments

fontSimpleFont

SetHighlightTexture

self:SetHighlightTexture(asset, [blendMode])

Arguments

assetTextureAsset
blendModeBlendMode may be nil

SetMotionScriptsWhileDisabled

self:SetMotionScriptsWhileDisabled(motionScriptsWhileDisabled)

Arguments

motionScriptsWhileDisabledbool

SetNormalAtlas

self:SetNormalAtlas(atlas)

Arguments

atlastextureAtlas

SetNormalFontObject

self:SetNormalFontObject(font)

Arguments

fontSimpleFont

SetNormalTexture

self:SetNormalTexture(asset)

Arguments

assetTextureAsset

SetPushedAtlas

self:SetPushedAtlas(atlas)

Arguments

atlastextureAtlas

SetPushedTextOffset

self:SetPushedTextOffset(offsetX, offsetY)

Arguments

offsetXuiUnit
offsetYuiUnit

SetPushedTexture

self:SetPushedTexture(asset)

Arguments

assetTextureAsset

SetText

self:SetText([text])

Arguments

textcstring default ""

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