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
button | cstring default "LeftButton" | |
|---|---|---|
isDown | bool 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
buttonState | SimpleButtonStateToken |
|---|
GetDisabledFontObject
font = self:GetDisabledFontObject()
Returns
font | SimpleFont |
|---|
GetDisabledTexture
texture = self:GetDisabledTexture()
Returns
texture | SimpleTexture |
|---|
GetFontString
fontString = self:GetFontString()
Returns
fontString | SimpleFontString |
|---|
GetHighlightFontObject
font = self:GetHighlightFontObject()
Returns
font | SimpleFont |
|---|
GetHighlightTexture
texture = self:GetHighlightTexture()
Returns
texture | SimpleTexture |
|---|
GetMotionScriptsWhileDisabled
motionScriptsWhileDisabled = self:GetMotionScriptsWhileDisabled()
Returns
motionScriptsWhileDisabled | bool |
|---|
GetNormalFontObject
font = self:GetNormalFontObject()
Returns
font | SimpleFont |
|---|
GetNormalTexture
texture = self:GetNormalTexture()
Returns
texture | SimpleTexture |
|---|
GetPushedTextOffset
offsetX, offsetY = self:GetPushedTextOffset()
Returns
offsetX | uiUnit | |
|---|---|---|
offsetY | uiUnit |
GetPushedTexture
texture = self:GetPushedTexture()
Returns
texture | SimpleTexture |
|---|
GetText
text = self:GetText()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
text | cstring |
|---|
GetTextHeight
height = self:GetTextHeight()
Returns
height | uiUnit |
|---|
GetTextWidth
width = self:GetTextWidth()
Returns
width | uiUnit |
|---|
IsEnabled
isEnabled = self:IsEnabled()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
isEnabled | bool |
|---|
RegisterForClicks
self:RegisterForClicks(buttons)
Protected: only Blizzard's own code may call it.
Arguments
buttons | ClickButton |
|---|
RegisterForMouse
self:RegisterForMouse(buttons)
Protected: only Blizzard's own code may call it.
Arguments
buttons | ClickButton |
|---|
SetButtonState
self:SetButtonState(buttonState, [lock])
Arguments
buttonState | SimpleButtonStateToken | |
|---|---|---|
lock | bool default false |
SetDisabledAtlas
self:SetDisabledAtlas(atlas)
Arguments
atlas | textureAtlas |
|---|
SetDisabledFontObject
self:SetDisabledFontObject(font)
Arguments
font | SimpleFont |
|---|
SetDisabledTexture
self:SetDisabledTexture(asset)
Arguments
asset | TextureAsset |
|---|
SetEnabled
self:SetEnabled([enabled])
Protected: only Blizzard's own code may call it.
Arguments
enabled | bool default false |
|---|
SetFontString
self:SetFontString(fontString)
Arguments
fontString | SimpleFontString |
|---|
SetFormattedText
self:SetFormattedText(text)
Arguments
text | cstring |
|---|
SetHighlightAtlas
self:SetHighlightAtlas(atlas, [blendMode])
Arguments
atlas | textureAtlas | |
|---|---|---|
blendMode | BlendMode may be nil |
SetHighlightFontObject
self:SetHighlightFontObject(font)
Arguments
font | SimpleFont |
|---|
SetHighlightTexture
self:SetHighlightTexture(asset, [blendMode])
Arguments
asset | TextureAsset | |
|---|---|---|
blendMode | BlendMode may be nil |
SetMotionScriptsWhileDisabled
self:SetMotionScriptsWhileDisabled(motionScriptsWhileDisabled)
Arguments
motionScriptsWhileDisabled | bool |
|---|
SetNormalAtlas
self:SetNormalAtlas(atlas)
Arguments
atlas | textureAtlas |
|---|
SetNormalFontObject
self:SetNormalFontObject(font)
Arguments
font | SimpleFont |
|---|
SetNormalTexture
self:SetNormalTexture(asset)
Arguments
asset | TextureAsset |
|---|
SetPushedAtlas
self:SetPushedAtlas(atlas)
Arguments
atlas | textureAtlas |
|---|
SetPushedTextOffset
self:SetPushedTextOffset(offsetX, offsetY)
Arguments
offsetX | uiUnit | |
|---|---|---|
offsetY | uiUnit |
SetPushedTexture
self:SetPushedTexture(asset)
Arguments
asset | TextureAsset |
|---|
SetText
self:SetText([text])
Arguments
text | cstring default "" |
|---|