WowAddons

World of Warcraft Forever API · DurationTextBindingObjectAPI.md, for your AI

DurationTextBindingObjectAPI (widget methods)

30 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

Assign

self:Assign(other)

Copies another duration text binding and assigns it to this one.

Arguments

otherDurationTextBinding

CanFormatText

canFormatText = self:CanFormatText()

Returns true if this binding has enough configuration to produce formatted text.

Returns

canFormatTextbool

CanUpdateFontString

canUpdateText = self:CanUpdateFontString()

Returns true if this binding has enough configuration to update its font string with formatted text.

Returns

canUpdateTextbool

ClearTextColorCurve

self:ClearTextColorCurve()

Clears the text color curve used by this binding.

Copy

copy = self:Copy()

Returns a copy of this duration text binding.

Returns

copyDurationTextBinding

Disable

self:Disable()

Disables automatic updates for this duration text binding.

Enable

self:Enable()

Enables automatic updates for this duration text binding.

GetDuration

duration = self:GetDuration()

Returns the duration object used by this duration text binding.

Returns

durationLuaDurationObject may be nil

GetExpiredText

text = self:GetExpiredText()

Returns the text shown when the duration has fully expired.

Returns

textstring may be nil

GetFontString

fontString = self:GetFontString()

Returns the font string updated by this duration text binding.

Returns

fontStringSimpleFontString may be nil

GetFormattedText

text = self:GetFormattedText()

Returns the text that would currently be assigned to the configured font string.

Returns

textstring

GetFormattedTextColor

color = self:GetFormattedTextColor()

Returns the text color that would currently be assigned to the configured font string.

May return nothing.

Returns

colorcolorRGBA

GetTextColorCurve

curve, property = self:GetTextColorCurve()

Returns the text color curve used by this binding.

May return nothing.

Returns

curveLuaColorCurveObject
propertyDurationTextBindingProperty

GetTimeModifier

modifier = self:GetTimeModifier()

Returns the time modifier used when sampling duration values for this binding.

Returns

modifierDurationTimeModifier

GetUpdateInterval

updateInterval = self:GetUpdateInterval()

Returns the minimum number of seconds between automatic text updates. A value of zero updates every game tick.

Returns

updateIntervalnumber

GetZeroDurationText

text = self:GetZeroDurationText()

Returns the text shown when the duration is not configured, or represents a zero-duration time span.

Returns

textstring may be nil

HasSecretValues

hasSecretValues = self:HasSecretValues()

Returns true if the duration text binding has been configured with any secret values.

Returns

hasSecretValuesbool

IsEnabled

enabled = self:IsEnabled()

Returns true if this duration text binding updates its font string automatically.

Returns

enabledbool

SetDuration

self:SetDuration(duration)

Configures the duration object used by this duration text binding.

Arguments

durationLuaDurationObject

SetEnabled

self:SetEnabled(enabled)

Configures whether this duration text binding updates its font string automatically.

Arguments

enabledbool

SetExpiredText

self:SetExpiredText([text])

Configures the text shown when the duration has fully expired.

Arguments

textstring may be nil

SetFontString

self:SetFontString(fontString)

Configures the font string updated by this duration text binding.

Arguments

fontStringSimpleFontString

SetFormatter

self:SetFormatter(formatter)

Configures the text format used by this duration text binding to display the remaining duration using the supplied formatter.

Arguments

formatterNumericFormatter

SetTextColorCurve

self:SetTextColorCurve(curve, property)

Configures this duration text binding to adjust fontstring text color by evaluating a duration property through a curve.

Arguments

curveLuaColorCurveObject
propertyDurationTextBindingProperty

SetTextFormat

self:SetTextFormat(formatString, components)

Configures the text format used by this duration text binding. The format string may contain '{}' placeholders, each of which is substituted by the corresponding component in the supplied array.

Arguments

formatStringstringView
componentsDurationTextBindingFormatComponent[]

SetTimeModifier

self:SetTimeModifier(modifier)

Configures the time modifier used when sampling duration values for this binding.

Arguments

modifierDurationTimeModifier

SetToDefaults

self:SetToDefaults()

Resets this duration text binding to its default state, clearing the configured font string, duration, format, formatter, and fallback text.

SetUpdateInterval

self:SetUpdateInterval(updateInterval)

Configures the minimum number of seconds between automatic text updates. A value of zero updates every game tick.

Arguments

updateIntervalnumber

SetZeroDurationText

self:SetZeroDurationText([text])

Configures the text shown when the duration is not configured, or represents a zero-duration time span.

Arguments

textstring may be nil

UpdateFontString

self:UpdateFontString()

Immediately updates the configured font string from the current duration state.

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