World of Warcraft Forever API · SimpleFontStringAPI.md, for your AI
SimpleFontStringAPI (widget methods)
57 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
CalculateScreenAreaFromCharacterSpan
areas = self:CalculateScreenAreaFromCharacterSpan(leftIndex, rightIndex)
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Arguments
leftIndex | luaIndex | |
|---|---|---|
rightIndex | luaIndex |
Returns
areas | uiBoundsRect[] may be nil |
|---|
CanNonSpaceWrap
wrap = self:CanNonSpaceWrap()
Returns
wrap | bool |
|---|
CanWordWrap
wrap = self:CanWordWrap()
Returns
wrap | bool |
|---|
ClearAlphaGradient
self:ClearAlphaGradient()
ClearText
self:ClearText()
Sets text to an empty string and removes the Text secret aspect.
FindCharacterIndexAtCoordinate
characterIndex, inside = self:FindCharacterIndexAtCoordinate(x, y)
May return nothing.
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Arguments
x | uiUnit | |
|---|---|---|
y | uiUnit |
Returns
characterIndex | luaIndex | |
|---|---|---|
inside | bool |
GetAlphaGradient
start, length = self:GetAlphaGradient()
Returns
start | number | |
|---|---|---|
length | number |
GetFieldSize
fieldSize = self:GetFieldSize()
Returns
fieldSize | number |
|---|
GetFont
fontFile, fontHeight, flags = self:GetFont()
Returns
fontFile | FontAsset may be nil | |
|---|---|---|
fontHeight | uiUnit | |
flags | TBFFlags |
GetFontHeight
height = self:GetFontHeight([calculated])
Arguments
calculated | bool default true |
|---|
Returns
height | uiUnit |
|---|
GetFontObject
font = self:GetFontObject()
Returns
font | SimpleFont |
|---|
GetIndentedWordWrap
wrap = self:GetIndentedWordWrap()
Returns
wrap | bool |
|---|
GetJustifyH
justifyH = self:GetJustifyH()
Returns
justifyH | JustifyHorizontal |
|---|
GetJustifyV
justifyV = self:GetJustifyV()
Returns
justifyV | JustifyVertical |
|---|
GetLineHeight
lineHeight = self:GetLineHeight()
Returns
lineHeight | uiUnit |
|---|
GetMaxLines
maxLines = self:GetMaxLines()
Returns
maxLines | number |
|---|
GetNumLines
numLines = self:GetNumLines()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
numLines | number |
|---|
GetRotation
radians = self:GetRotation()
Returns
radians | number |
|---|
GetScaleAnimationMode
scaleAnimationMode = self:GetScaleAnimationMode()
Returns
scaleAnimationMode | FontStringScaleAnimationMode |
|---|
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 |
GetSmoothScaling
smoothScaling = self:GetSmoothScaling()
Returns
smoothScaling | bool |
|---|
GetSpacing
spacing = self:GetSpacing()
Returns
spacing | uiUnit |
|---|
GetStringHeight
height = self:GetStringHeight()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
height | uiUnit |
|---|
GetStringWidth
width = self:GetStringWidth()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
width | uiUnit |
|---|
GetText
text = self:GetText()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
text | cstring |
|---|
GetTextColor
colorR, colorG, colorB, colorA = self:GetTextColor()
May return nothing.
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
colorR | number | |
|---|---|---|
colorG | number | |
colorB | number | |
colorA | number |
GetTextScale
textScale = self:GetTextScale()
Returns
textScale | number |
|---|
GetUnboundedStringWidth
width = self:GetUnboundedStringWidth()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
width | uiUnit |
|---|
GetUnboundedStringWidthForText
width = self:GetUnboundedStringWidthForText(text)
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Arguments
text | cstring |
|---|
Returns
width | uiUnit |
|---|
GetWrappedWidth
width = self:GetWrappedWidth()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
width | uiUnit |
|---|
IsTruncated
isTruncated = self:IsTruncated()
Its returns can be secret values (in some instances and fights): guard them before any arithmetic.
Returns
isTruncated | bool |
|---|
OnColorsUpdated
self:OnColorsUpdated()
SetAlphaGradient
isWithinText = self:SetAlphaGradient(start, length)
Arguments
start | number | |
|---|---|---|
length | number |
Returns
isWithinText | bool |
|---|
SetDesaturateEmbeddedTextures
self:SetDesaturateEmbeddedTextures(desaturate)
Arguments
desaturate | bool |
|---|
SetFixedColor
self:SetFixedColor(fixedColor)
Arguments
fixedColor | bool |
|---|
SetFont
success = self:SetFont(fontFile, fontHeight, [flags])
Arguments
fontFile | FontAsset | |
|---|---|---|
fontHeight | uiFontHeight | |
flags | TBFFlags may be nil |
Returns
success | bool |
|---|
SetFontHeight
self:SetFontHeight(height)
Arguments
height | uiUnit |
|---|
SetFontObject
self:SetFontObject(font)
Arguments
font | SimpleFont |
|---|
SetFormattedText
self:SetFormattedText(text)
Arguments
text | cstring |
|---|
SetIndentedWordWrap
self:SetIndentedWordWrap(wrap)
Arguments
wrap | bool |
|---|
SetJustifyH
self:SetJustifyH(justifyH)
Arguments
justifyH | JustifyHorizontal |
|---|
SetJustifyV
self:SetJustifyV(justifyV)
Arguments
justifyV | JustifyVertical |
|---|
SetMaxLines
self:SetMaxLines(maxLines)
Arguments
maxLines | number |
|---|
SetNonSpaceWrap
self:SetNonSpaceWrap(wrap)
Arguments
wrap | bool |
|---|
SetRotation
self:SetRotation(radians)
Arguments
radians | number |
|---|
SetScaleAnimationMode
self:SetScaleAnimationMode(scaleAnimationMode)
Arguments
scaleAnimationMode | FontStringScaleAnimationMode |
|---|
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 |
SetSmoothScaling
self:SetSmoothScaling(smoothScaling)
Arguments
smoothScaling | bool | If true, text height will not snap to nearest whole numbers for scaled font strings. |
|---|
SetSpacing
self:SetSpacing(spacing)
Arguments
spacing | uiUnit |
|---|
SetText
self:SetText([text])
Arguments
text | cstring default "" |
|---|
SetTextColor
self:SetTextColor(colorR, colorG, colorB, [a])
Arguments
colorR | number | |
|---|---|---|
colorG | number | |
colorB | number | |
a | SingleColorValue may be nil |
SetTextHeight
self:SetTextHeight(height)
Arguments
height | uiUnit |
|---|
SetTextScale
self:SetTextScale(textScale)
Arguments
textScale | number |
|---|
SetTextToFit
self:SetTextToFit([text])
Arguments
text | cstring default "" |
|---|
SetWordWrap
self:SetWordWrap(wrap)
Arguments
wrap | bool |
|---|