World of Warcraft Forever API · SimpleHTMLAPI.md, for your AI
SimpleHTMLAPI (widget methods)
23 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
GetContentHeight
height = self:GetContentHeight()
Returns
height | uiUnit |
|---|
GetFont
fontFile, height, flags = self:GetFont(textType)
Arguments
textType | HTMLTextType |
|---|
Returns
fontFile | cstring | |
|---|---|---|
height | uiFontHeight | |
flags | TBFFlags |
GetFontObject
font = self:GetFontObject(textType)
Arguments
textType | HTMLTextType |
|---|
Returns
font | SimpleFont |
|---|
GetHyperlinkFormat
format = self:GetHyperlinkFormat()
Returns
format | cstring |
|---|
GetIndentedWordWrap
wordWrap = self:GetIndentedWordWrap(textType)
Arguments
textType | HTMLTextType |
|---|
Returns
wordWrap | bool |
|---|
GetJustifyH
justifyH = self:GetJustifyH(textType)
Arguments
textType | HTMLTextType |
|---|
Returns
justifyH | JustifyHorizontal |
|---|
GetJustifyV
justifyV = self:GetJustifyV(textType)
Arguments
textType | HTMLTextType |
|---|
Returns
justifyV | JustifyVertical |
|---|
GetShadowColor
colorR, colorG, colorB, colorA = self:GetShadowColor(textType)
Arguments
textType | HTMLTextType |
|---|
Returns
colorR | number | |
|---|---|---|
colorG | number | |
colorB | number | |
colorA | number |
GetShadowOffset
offsetX, offsetY = self:GetShadowOffset(textType)
Arguments
textType | HTMLTextType |
|---|
Returns
offsetX | number | |
|---|---|---|
offsetY | number |
GetSpacing
spacing = self:GetSpacing(textType)
Arguments
textType | HTMLTextType |
|---|
Returns
spacing | uiUnit |
|---|
GetTextColor
colorR, colorG, colorB, colorA = self:GetTextColor(textType)
Arguments
textType | HTMLTextType |
|---|
Returns
colorR | number | |
|---|---|---|
colorG | number | |
colorB | number | |
colorA | number |
GetTextData
content = self:GetTextData()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
content | HTMLContentNode[] |
|---|
SetFont
self:SetFont(textType, fontFile, height, flags)
Arguments
textType | HTMLTextType | |
|---|---|---|
fontFile | cstring | |
height | uiFontHeight | |
flags | TBFFlags |
SetFontObject
self:SetFontObject(textType, font)
Arguments
textType | HTMLTextType | |
|---|---|---|
font | SimpleFont |
SetHyperlinkFormat
self:SetHyperlinkFormat(format)
Arguments
format | cstring |
|---|
SetIndentedWordWrap
self:SetIndentedWordWrap(textType, wordWrap)
Arguments
textType | HTMLTextType | |
|---|---|---|
wordWrap | bool |
SetJustifyH
self:SetJustifyH(textType, justifyH)
Arguments
textType | HTMLTextType | |
|---|---|---|
justifyH | JustifyHorizontal |
SetJustifyV
self:SetJustifyV(textType, justifyV)
Arguments
textType | HTMLTextType | |
|---|---|---|
justifyV | JustifyVertical |
SetShadowColor
self:SetShadowColor(textType, colorR, colorG, colorB, [a])
Arguments
textType | HTMLTextType | |
|---|---|---|
colorR | number | |
colorG | number | |
colorB | number | |
a | SingleColorValue may be nil |
SetShadowOffset
self:SetShadowOffset(textType, offsetX, offsetY)
Arguments
textType | HTMLTextType | |
|---|---|---|
offsetX | number | |
offsetY | number |
SetSpacing
self:SetSpacing(textType, spacing)
Arguments
textType | HTMLTextType | |
|---|---|---|
spacing | uiUnit |
SetText
self:SetText(text, [ignoreMarkup])
Arguments
text | cstring | |
|---|---|---|
ignoreMarkup | bool default false |
SetTextColor
self:SetTextColor(textType, colorR, colorG, colorB, [a])
Arguments
textType | HTMLTextType | |
|---|---|---|
colorR | number | |
colorG | number | |
colorB | number | |
a | SingleColorValue may be nil |