WowAddons

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

leftIndexluaIndex
rightIndexluaIndex

Returns

areasuiBoundsRect[] may be nil

CanNonSpaceWrap

wrap = self:CanNonSpaceWrap()

Returns

wrapbool

CanWordWrap

wrap = self:CanWordWrap()

Returns

wrapbool

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

xuiUnit
yuiUnit

Returns

characterIndexluaIndex
insidebool

GetAlphaGradient

start, length = self:GetAlphaGradient()

Returns

startnumber
lengthnumber

GetFieldSize

fieldSize = self:GetFieldSize()

Returns

fieldSizenumber

GetFont

fontFile, fontHeight, flags = self:GetFont()

Returns

fontFileFontAsset may be nil
fontHeightuiUnit
flagsTBFFlags

GetFontHeight

height = self:GetFontHeight([calculated])

Arguments

calculatedbool default true

Returns

heightuiUnit

GetFontObject

font = self:GetFontObject()

Returns

fontSimpleFont

GetIndentedWordWrap

wrap = self:GetIndentedWordWrap()

Returns

wrapbool

GetJustifyH

justifyH = self:GetJustifyH()

Returns

justifyHJustifyHorizontal

GetJustifyV

justifyV = self:GetJustifyV()

Returns

justifyVJustifyVertical

GetLineHeight

lineHeight = self:GetLineHeight()

Returns

lineHeightuiUnit

GetMaxLines

maxLines = self:GetMaxLines()

Returns

maxLinesnumber

GetNumLines

numLines = self:GetNumLines()

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

Returns

numLinesnumber

GetRotation

radians = self:GetRotation()

Returns

radiansnumber

GetScaleAnimationMode

scaleAnimationMode = self:GetScaleAnimationMode()

Returns

scaleAnimationModeFontStringScaleAnimationMode

GetShadowColor

colorR, colorG, colorB, colorA = self:GetShadowColor()

Returns

colorRnumber
colorGnumber
colorBnumber
colorAnumber

GetShadowOffset

offsetX, offsetY = self:GetShadowOffset()

Returns

offsetXnumber
offsetYnumber

GetSmoothScaling

smoothScaling = self:GetSmoothScaling()

Returns

smoothScalingbool

GetSpacing

spacing = self:GetSpacing()

Returns

spacinguiUnit

GetStringHeight

height = self:GetStringHeight()

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

Returns

heightuiUnit

GetStringWidth

width = self:GetStringWidth()

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

Returns

widthuiUnit

GetText

text = self:GetText()

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

Returns

textcstring

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

colorRnumber
colorGnumber
colorBnumber
colorAnumber

GetTextScale

textScale = self:GetTextScale()

Returns

textScalenumber

GetUnboundedStringWidth

width = self:GetUnboundedStringWidth()

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

Returns

widthuiUnit

GetUnboundedStringWidthForText

width = self:GetUnboundedStringWidthForText(text)

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

Arguments

textcstring

Returns

widthuiUnit

GetWrappedWidth

width = self:GetWrappedWidth()

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

Returns

widthuiUnit

IsTruncated

isTruncated = self:IsTruncated()

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

Returns

isTruncatedbool

OnColorsUpdated

self:OnColorsUpdated()

SetAlphaGradient

isWithinText = self:SetAlphaGradient(start, length)

Arguments

startnumber
lengthnumber

Returns

isWithinTextbool

SetDesaturateEmbeddedTextures

self:SetDesaturateEmbeddedTextures(desaturate)

Arguments

desaturatebool

SetFixedColor

self:SetFixedColor(fixedColor)

Arguments

fixedColorbool

SetFont

success = self:SetFont(fontFile, fontHeight, [flags])

Arguments

fontFileFontAsset
fontHeightuiFontHeight
flagsTBFFlags may be nil

Returns

successbool

SetFontHeight

self:SetFontHeight(height)

Arguments

heightuiUnit

SetFontObject

self:SetFontObject(font)

Arguments

fontSimpleFont

SetFormattedText

self:SetFormattedText(text)

Arguments

textcstring

SetIndentedWordWrap

self:SetIndentedWordWrap(wrap)

Arguments

wrapbool

SetJustifyH

self:SetJustifyH(justifyH)

Arguments

justifyHJustifyHorizontal

SetJustifyV

self:SetJustifyV(justifyV)

Arguments

justifyVJustifyVertical

SetMaxLines

self:SetMaxLines(maxLines)

Arguments

maxLinesnumber

SetNonSpaceWrap

self:SetNonSpaceWrap(wrap)

Arguments

wrapbool

SetRotation

self:SetRotation(radians)

Arguments

radiansnumber

SetScaleAnimationMode

self:SetScaleAnimationMode(scaleAnimationMode)

Arguments

scaleAnimationModeFontStringScaleAnimationMode

SetShadowColor

self:SetShadowColor(colorR, colorG, colorB, [a])

Arguments

colorRnumber
colorGnumber
colorBnumber
aSingleColorValue may be nil

SetShadowOffset

self:SetShadowOffset(offsetX, offsetY)

Arguments

offsetXnumber
offsetYnumber

SetSmoothScaling

self:SetSmoothScaling(smoothScaling)

Arguments

smoothScalingboolIf true, text height will not snap to nearest whole numbers for scaled font strings.

SetSpacing

self:SetSpacing(spacing)

Arguments

spacinguiUnit

SetText

self:SetText([text])

Arguments

textcstring default ""

SetTextColor

self:SetTextColor(colorR, colorG, colorB, [a])

Arguments

colorRnumber
colorGnumber
colorBnumber
aSingleColorValue may be nil

SetTextHeight

self:SetTextHeight(height)

Arguments

heightuiUnit

SetTextScale

self:SetTextScale(textScale)

Arguments

textScalenumber

SetTextToFit

self:SetTextToFit([text])

Arguments

textcstring default ""

SetWordWrap

self:SetWordWrap(wrap)

Arguments

wrapbool

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