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
other | DurationTextBinding |
|---|
CanFormatText
canFormatText = self:CanFormatText()
Returns true if this binding has enough configuration to produce formatted text.
Returns
canFormatText | bool |
|---|
CanUpdateFontString
canUpdateText = self:CanUpdateFontString()
Returns true if this binding has enough configuration to update its font string with formatted text.
Returns
canUpdateText | bool |
|---|
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
copy | DurationTextBinding |
|---|
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
duration | LuaDurationObject may be nil |
|---|
GetExpiredText
text = self:GetExpiredText()
Returns the text shown when the duration has fully expired.
Returns
text | string may be nil |
|---|
GetFontString
fontString = self:GetFontString()
Returns the font string updated by this duration text binding.
Returns
fontString | SimpleFontString may be nil |
|---|
GetFormattedText
text = self:GetFormattedText()
Returns the text that would currently be assigned to the configured font string.
Returns
text | string |
|---|
GetFormattedTextColor
color = self:GetFormattedTextColor()
Returns the text color that would currently be assigned to the configured font string.
May return nothing.
Returns
color | colorRGBA |
|---|
GetTextColorCurve
curve, property = self:GetTextColorCurve()
Returns the text color curve used by this binding.
May return nothing.
Returns
curve | LuaColorCurveObject | |
|---|---|---|
property | DurationTextBindingProperty |
GetTimeModifier
modifier = self:GetTimeModifier()
Returns the time modifier used when sampling duration values for this binding.
Returns
modifier | DurationTimeModifier |
|---|
GetUpdateInterval
updateInterval = self:GetUpdateInterval()
Returns the minimum number of seconds between automatic text updates. A value of zero updates every game tick.
Returns
updateInterval | number |
|---|
GetZeroDurationText
text = self:GetZeroDurationText()
Returns the text shown when the duration is not configured, or represents a zero-duration time span.
Returns
text | string may be nil |
|---|
HasSecretValues
hasSecretValues = self:HasSecretValues()
Returns true if the duration text binding has been configured with any secret values.
Returns
hasSecretValues | bool |
|---|
IsEnabled
enabled = self:IsEnabled()
Returns true if this duration text binding updates its font string automatically.
Returns
enabled | bool |
|---|
SetDuration
self:SetDuration(duration)
Configures the duration object used by this duration text binding.
Arguments
duration | LuaDurationObject |
|---|
SetEnabled
self:SetEnabled(enabled)
Configures whether this duration text binding updates its font string automatically.
Arguments
enabled | bool |
|---|
SetExpiredText
self:SetExpiredText([text])
Configures the text shown when the duration has fully expired.
Arguments
text | string may be nil |
|---|
SetFontString
self:SetFontString(fontString)
Configures the font string updated by this duration text binding.
Arguments
fontString | SimpleFontString |
|---|
SetFormatter
self:SetFormatter(formatter)
Configures the text format used by this duration text binding to display the remaining duration using the supplied formatter.
Arguments
formatter | NumericFormatter |
|---|
SetTextColorCurve
self:SetTextColorCurve(curve, property)
Configures this duration text binding to adjust fontstring text color by evaluating a duration property through a curve.
Arguments
curve | LuaColorCurveObject | |
|---|---|---|
property | DurationTextBindingProperty |
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
formatString | stringView | |
|---|---|---|
components | DurationTextBindingFormatComponent[] |
SetTimeModifier
self:SetTimeModifier(modifier)
Configures the time modifier used when sampling duration values for this binding.
Arguments
modifier | DurationTimeModifier |
|---|
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
updateInterval | number |
|---|
SetZeroDurationText
self:SetZeroDurationText([text])
Configures the text shown when the duration is not configured, or represents a zero-duration time span.
Arguments
text | string may be nil |
|---|
UpdateFontString
self:UpdateFontString()
Immediately updates the configured font string from the current duration state.