World of Warcraft Forever API · SimpleFontAPI.md, for your AI
SimpleFontAPI (widget methods)
24 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
CopyFontObject
self:CopyFontObject(sourceFont)
Arguments
sourceFont | SimpleFont |
|---|
GetAlpha
alpha = self:GetAlpha()
Returns
alpha | SingleColorValue |
|---|
GetFont
fontFile, height, flags = self:GetFont()
Returns
fontFile | cstring | |
|---|---|---|
height | uiFontHeight | |
flags | TBFFlags |
GetFontHeight
height = self:GetFontHeight()
Return is either in uiUnits or internal height due to fixedHeight.
Returns
height | number |
|---|
GetFontObject
font = self:GetFontObject()
Returns
font | SimpleFont |
|---|
GetFontObjectForAlphabet
font = self:GetFontObjectForAlphabet(alphabet)
Arguments
alphabet | FontAlphabet |
|---|
Returns
font | SimpleFont |
|---|
GetIndentedWordWrap
wordWrap = self:GetIndentedWordWrap()
Returns
wordWrap | bool |
|---|
GetJustifyH
justifyH = self:GetJustifyH()
Returns
justifyH | JustifyHorizontal |
|---|
GetJustifyV
justifyV = self:GetJustifyV()
Returns
justifyV | JustifyVertical |
|---|
GetShadowColor
colorR, colorG, colorB, colorA = self:GetShadowColor()
Returns
colorR | number | |
|---|---|---|
colorG | number | |
colorB | number | |
colorA | number |
GetShadowOffset
offsetX, offsetY = self:GetShadowOffset()
Returns
offsetX | number | |
|---|---|---|
offsetY | number |
GetSpacing
spacing = self:GetSpacing()
Returns
spacing | uiUnit |
|---|
GetTextColor
colorR, colorG, colorB, colorA = self:GetTextColor()
Returns
colorR | number | |
|---|---|---|
colorG | number | |
colorB | number | |
colorA | number |
SetAlpha
self:SetAlpha(alpha)
Arguments
alpha | SingleColorValue |
|---|
SetFont
self:SetFont(fontFile, height, flags)
Arguments
fontFile | cstring | |
|---|---|---|
height | uiFontHeight | |
flags | TBFFlags |
SetFontHeight
self:SetFontHeight(height)
Preserves all flags, does correct height conversion due to fixedHeight.
Arguments
height | number |
|---|
SetFontObject
self:SetFontObject(font)
Arguments
font | SimpleFont |
|---|
SetIndentedWordWrap
self:SetIndentedWordWrap(wordWrap)
Arguments
wordWrap | bool |
|---|
SetJustifyH
self:SetJustifyH(justifyH)
Arguments
justifyH | JustifyHorizontal |
|---|
SetJustifyV
self:SetJustifyV(justifyV)
Arguments
justifyV | JustifyVertical |
|---|
SetShadowColor
self:SetShadowColor(colorR, colorG, colorB, [a])
Arguments
colorR | number | |
|---|---|---|
colorG | number | |
colorB | number | |
a | SingleColorValue may be nil |
SetShadowOffset
self:SetShadowOffset(offsetX, offsetY)
Arguments
offsetX | number | |
|---|---|---|
offsetY | number |
SetSpacing
self:SetSpacing(spacing)
Arguments
spacing | uiUnit |
|---|
SetTextColor
self:SetTextColor(colorR, colorG, colorB, [a])
Arguments
colorR | number | |
|---|---|---|
colorG | number | |
colorB | number | |
a | SingleColorValue may be nil |