The API is no longer being updated here until further notice. |
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[]
- CooldownFrameTemplate - FrameXML template for the default UI appearance.