Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
No edit summary
Tag: WoW API docs
No edit summary
Tag: WoW API docs
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{widget}} {{tocright}} {{seealso|Cooldown}}
+
{{widget}} {{tocright}}
<onlyinclude>{{api|t=o|Cooldown}} (inherits from [[#Frame|Frame]]) is a specialized variety of Frame that displays the little "clock" effect over abilities and buffs.</onlyinclude> It can be set with its running time, whether it should appear to "fill up" or "empty out", and whether or not there should be a bright edge where it's changing between dim and bright.
+
<onlyinclude><includeonly><div style="font-size:smaller; float:right;">{{Edit|UIOBJECT Cooldown|Edit Cooldown}}</div></includeonly>[[UIOBJECT Cooldown|Cooldown]] (inherits from {{api|t=o|Frame}}) displays "clock-like" sweep and leading-edge effects over abilities and buffs.</onlyinclude> It self-animates from a start time and duration, and the animated textures may be independently configured.
 
Cooldowns are usually children of another frame, and typically set to cover the same area as that frame, or almost all of it. In the stock UI, they are used mostly to display cooldowns on action buttons and buffs or debuffs on targets.
 
   
 
Cooldowns are usually children of another frame and set to {{api|t=w|Region:SetAllPoints|cover the same area}}. The stock UI uses this widget with to display ability [[cooldown]]s on action buttons or buff/debuff durations on unit frames.
 
== Defined Methods ==
 
== Defined Methods ==
 
<onlyinclude>{{#switch:{{{t|widgetmethod}}}|w|wm|widgetmethod=
 
<onlyinclude>{{#switch:{{{t|widgetmethod}}}|w|wm|widgetmethod=
Line 46: Line 45:
 
<!-- Please read https://wow.gamepedia.com/Wowpedia:External_links_policy before adding new links. -->
 
<!-- Please read https://wow.gamepedia.com/Wowpedia:External_links_policy before adding new links. -->
 
{{Elinks-api|nogit=|wowprog=http://wowprogramming.com/docs/widgets/Cooldown.html}}
 
{{Elinks-api|nogit=|wowprog=http://wowprogramming.com/docs/widgets/Cooldown.html}}
  +
* [https://www.townlong-yak.com/framexml/live/Cooldown.xml CooldownFrameTemplate] - FrameXML template for the default UI appearance.

Revision as of 19:11, 8 August 2021

Cooldown (inherits from Frame) displays "clock-like" sweep and leading-edge effects over abilities and buffs. It self-animates from a start time and duration, and the animated textures may be independently configured.

Cooldowns are usually children of another frame and set to cover the same area. The stock UI uses this widget with to display ability cooldowns on action buttons or buff/debuff durations on unit frames.

Defined Methods

Cooldown:Clear() - Clears the currently active cooldown of the widget
Cooldown:GetCooldownDisplayDuration()
Cooldown:GetCooldownDuration() - Returns the duration currently shown by the cooldown frame in milliseconds
Cooldown:GetCooldownTimes() - Returns the starting time and duration of the cooldown frame in milliseconds
Cooldown:GetDrawBling()
Cooldown:GetDrawEdge() - Returns whether a bright line should be drawn on the moving edge of the cooldown animation
Cooldown:GetDrawSwipe()
Cooldown:GetEdgeScale()
Cooldown:GetReverse() - Returns whether the bright and dark portions of the cooldown animation should be inverted
Cooldown:GetRotation() - Get the current rotation of the cooldown in radians
Cooldown:IsPaused() - Returns whether the cooldown is currently paused
Cooldown:Pause() - Pause the cooldown
Cooldown:Resume() - Resume the cooldown after being paused
Cooldown:SetBlingTexture(file or fileDataID, [r, g, b, a])
Cooldown:SetCooldown(start, duration[, modRate]) - Shows a cooldown animation.
Cooldown:SetCooldownDuration(duration[, modRate])
Cooldown:SetCooldownUNIX(start, duration[, modRate])
Cooldown:SetCountdownAbbrevThreshold(seconds)
Cooldown:SetCountdownFont(font)
Cooldown:SetDrawBling()
Cooldown:SetDrawEdge(enable) - Sets whether a bright line should be drawn on the moving edge of the cooldown animation
Cooldown:SetDrawSwipe()
Cooldown:SetEdgeScale(edgeScale)
Cooldown:SetEdgeTexture(file or fileDataID, [r, g, b, a]) - Set the texture which 'follows' the moving edge of the cooldown
Cooldown:SetHideCountdownNumbers(hide) - Show or hide text cooldown timer
Cooldown:SetReverse(boolean) - Controls the direction of the cooldown animation.
Cooldown:SetRotation(rotationRadians) - Rotate the entire cooldown a certain radians clockwise
Cooldown:SetSwipeColor(r, g, b, [a]) - Set the color of the swipe
Cooldown:SetSwipeTexture(file or fileDataID, [r, g, b, a]) - Set the swipe texture used for the cooldown
Cooldown:SetUseCircularEdge(boolean) - Sets whether the edge texture should follow a circular pattern instead of square

Defined Script Handlers

OnCooldownDone(self) - Run when a cooldown has finished.

External links