Cooldown is a specialized variety of Frame that displays the little "clock" effect over abilities and buffs. 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.
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.
Defined Methods
- enabled = Cooldown:GetDrawEdge() - Returns whether a bright line should be drawn on the moving edge of the cooldown animation
- enabled = Cooldown:GetReverse() - Returns whether the bright and dark portions of the cooldown animation should be inverted
- Cooldown:SetCooldown(start, duration) - Sets up the parameters for a Cooldown model.
- Cooldown:SetDrawEdge(enable) - Sets whether a bright line should be drawn on the moving edge of the cooldown animation
- Cooldown:SetReverse(reverse) - Sets whether to invert the bright and dark portions of the cooldown animation
Inherited Methods
- Cooldown:AllowAttributeChanges() - Temporarily allows insecure code to modify the frame's attributes during combat
- enabled = Cooldown:CanChangeAttribute() - Returns whether secure frame attributes can currently be changed
- canChange = Cooldown:CanChangeProtectedState() - Returns whether protected properties of the region can be changed by non-secure scripts
- Cooldown:ClearAllPoints() - Removes all anchor points from the region
- animationGroup = Cooldown:CreateAnimationGroup(["name" [, "inheritsFrom"]]) - Creates a new AnimationGroup as a child of the region
- fontstring = Cooldown:CreateFontString(["name" [, "layer" [, "inherits"]]]) - Creates a new [[docs/widgets/FontString|`FontString`]] as a child of the frame
- texture = Cooldown:CreateTexture(["name" [, "layer" [, "inherits"]]]) - Creates a new [[docs/widgets/Texture|`Texture`]] as a child of the frame
- region = Cooldown:CreateTitleRegion() - Creates a title region for dragging the frame
- Cooldown:DisableDrawLayer("layer") - Prevents display of all child objects of the frame on a specified graphics layer
- Cooldown:EnableDrawLayer("layer") - Allows display of all child objects of the frame on a specified graphics layer
- Cooldown:EnableJoystick(enable) - Enables or disables joystick interactivity
- Cooldown:EnableKeyboard(enable) - Enables or disables keyboard interactivity for the frame
- Cooldown:EnableMouse(enable) - Enables or disables mouse interactivity for the frame
- Cooldown:EnableMouseWheel(enable) - Enables or disables mouse wheel interactivity for the frame
- alpha = Cooldown:GetAlpha() - Returns the opacity of the region relative to its parent
- ... = Cooldown:GetAnimationGroups() - Returns a list of animation groups belonging to the region
- value = Cooldown:GetAttribute("name") - Returns the value of a secure frame attribute
- backdrop = Cooldown:GetBackdrop() - Returns information about the frame's backdrop graphic
- red, green, blue, alpha = Cooldown:GetBackdropBorderColor() - Returns the shading color for the frame's border graphic
- red, green, blue, alpha = Cooldown:GetBackdropColor() - Returns the shading color for the frame's background graphic
- bottom = Cooldown:GetBottom() - Returns the distance from the bottom of the screen to the bottom of the region
- left, bottom, width, height = Cooldown:GetBoundsRect() - Returns the position and dimension of the smallest area enclosing the frame and its children
- x, y = Cooldown:GetCenter() - Returns the screen coordinates of the region's center
- ... = Cooldown:GetChildren() - Returns a list of child frames of the frame
- left, right, top, bottom = Cooldown:GetClampRectInsets() - Returns offsets from the frame's edges used when limiting user movement or resizing of the frame
- depth = Cooldown:GetDepth() - Returns the 3D depth of the frame (for stereoscopic 3D setups)
- alpha = Cooldown:GetEffectiveAlpha() - Returns the overall opacity of the frame
- depth = Cooldown:GetEffectiveDepth() - Returns the overall 3D depth of the frame (for stereoscopic 3D configurations)
- scale = Cooldown:GetEffectiveScale() - Returns the overall scale factor of the frame
- level = Cooldown:GetFrameLevel() - Sets the level at which the frame is layered relative to others in its strata
- strata = Cooldown:GetFrameStrata() - Returns the general layering strata of the frame
- height = Cooldown:GetHeight() - Returns the height of the region
- left, right, top, bottom = Cooldown:GetHitRectInsets() - Returns the insets from the frame's edges which determine its mouse-interactable area
- id = Cooldown:GetID() - Returns the frame's numeric identifier
- left = Cooldown:GetLeft() - Returns the distance from the left edge of the screen to the left edge of the region
- maxWidth, maxHeight = Cooldown:GetMaxResize() - Returns the maximum size of the frame for user resizing
- minWidth, minHeight = Cooldown:GetMinResize() - Returns the minimum size of the frame for user resizing
- name = Cooldown:GetName() - Returns the widget object's name
- numChildren = Cooldown:GetNumChildren() - Returns the number of child frames belonging to the frame
- numPoints = Cooldown:GetNumPoints() - Returns the number of anchor points defined for the region
- numRegions = Cooldown:GetNumRegions() - Returns the number of non-Frame child regions belonging to the frame
- type = Cooldown:GetObjectType() - Returns the object's widget type
- parent = Cooldown:GetParent() - Returns the object's parent object
- point, relativeTo, relativePoint, xOffset, yOffset = Cooldown:GetPoint(index) - Returns information about one of the region's anchor points
- left, bottom, width, height = Cooldown:GetRect() - Returns the position and dimensions of the region
- ... = Cooldown:GetRegions() - Returns a list of non-Frame child regions belonging to the frame
- right = Cooldown:GetRight() - Returns the distance from the left edge of the screen to the right edge of the region
- scale = Cooldown:GetScale() - Returns the frame's scale factor
- handler = Cooldown:GetScript("scriptType") - Returns the widget's handler function for a script
- width, height = Cooldown:GetSize() - Returns the width and height of the region
- region = Cooldown:GetTitleRegion() - Returns the frame's TitleRegion object
- top = Cooldown:GetTop() - Returns the distance from the bottom of the screen to the top of the region
- width = Cooldown:GetWidth() - Returns the width of the region
- hasScript = Cooldown:HasScript("scriptType") - Returns whether the widget supports a script handler
- Cooldown:Hide() - Hides the region
- Cooldown:HookScript("scriptType", handler) - Securely hooks a script handler
- Cooldown:IgnoreDepth(enable) - Sets whether the frame's depth property is ignored (for stereoscopic 3D setups)
- enabled = Cooldown:IsClampedToScreen() - Returns whether the frame's boundaries are limited to those of the screen
- isDragging = Cooldown:IsDragging() - Returns whether the region is currently being dragged
- registered = Cooldown:IsEventRegistered("event") - Returns whether the frame is registered for a given [[docs/events|event]]
- enabled = Cooldown:IsIgnoringDepth() - Returns whether the frame's depth property is ignored (for stereoscopic 3D setups)
- enabled = Cooldown:IsJoystickEnabled() - Returns whether joystick interactivity is enabled for the frame
- enabled = Cooldown:IsKeyboardEnabled() - Returns whether keyboard interactivity is enabled for the frame
- enabled = Cooldown:IsMouseEnabled() - Returns whether mouse interactivity is enabled for the frame
- isOver = Cooldown:IsMouseOver() - Returns whether the mouse cursor is over the given region
- enabled = Cooldown:IsMouseWheelEnabled() - Returns whether mouse wheel interactivity is enabled for the frame
- movable = Cooldown:IsMovable() - Returns whether the frame can be moved by the user
- isType = Cooldown:IsObjectType("type") - Returns whether the object belongs to a given widget type
- isProtected, explicit = Cooldown:IsProtected() - Returns whether the region is protected
- enabled = Cooldown:IsResizable() - Returns whether the frame can be resized by the user
- shown = Cooldown:IsShown() - Returns whether the region is shown
- enabled = Cooldown:IsToplevel() - Returns whether the frame is automatically raised to the front when clicked
- enabled = Cooldown:IsUserPlaced() - Returns whether the frame is flagged for automatic saving and restoration of position and dimensions
- visible = Cooldown:IsVisible() - Returns whether the region is visible
- Cooldown:Lower() - Reduces the frame's frame level below all other frames in its strata
- Cooldown:Raise() - Increases the frame's frame level above all other frames in its strata
- Cooldown:RegisterAllEvents() - Registers the frame for all events
- Cooldown:RegisterEvent("event") - Registers the frame for an [[docs/events|event]]
- Cooldown:RegisterForDrag(...) - Registers the frame for dragging
- Cooldown:SetAllPoints([region]) or Cooldown:SetAllPoints(["name"]) - Sets all anchor points of the region to match those of another region
- Cooldown:SetAlpha(alpha) - Sets the opacity of the region relative to its parent
- Cooldown:SetAttribute("name", value) - Sets a secure frame attribute
- Cooldown:SetBackdrop(backdrop) - Sets a backdrop graphic for the frame
- Cooldown:SetBackdropBorderColor(red, green, blue [, alpha]) - Sets a shading color for the frame's border graphic
- Cooldown:SetBackdropColor(red, green, blue [, alpha]) - Sets a shading color for the frame's background graphic
- Cooldown:SetClampRectInsets(left, right, top, bottom) - Sets offsets from the frame's edges used when limiting user movement or resizing of the frame
- Cooldown:SetClampedToScreen(enable) - Sets whether the frame's boundaries should be limited to those of the screen
- Cooldown:SetDepth(depth) - Sets the 3D depth of the frame (for stereoscopic 3D configurations)
- Cooldown:SetFrameLevel(level) - Sets the level at which the frame is layered relative to others in its strata
- Cooldown:SetFrameStrata("strata") - Sets the general layering strata of the frame
- Cooldown:SetHeight(height) - Sets the region's height
- Cooldown:SetHitRectInsets(left, right, top, bottom) - Sets the insets from the frame's edges which determine its mouse-interactable area
- Cooldown:SetID(id) - Sets a numeric identifier for the frame
- Cooldown:SetMaxResize(maxWidth, maxHeight) - Sets the maximum size of the frame for user resizing
- Cooldown:SetMinResize(minWidth, minHeight) - Sets the minimum size of the frame for user resizing
- Cooldown:SetMovable(enable) - Sets whether the frame can be moved by the user
- Cooldown:SetParent(frame) or Cooldown:SetParent("name") - Makes another frame the parent of this region
- Cooldown:SetPoint("point" [, relativeTo [, "relativePoint" [, xOffset [, yOffset]]]]) - Sets an anchor point for the region
- Cooldown:SetResizable(enable) - Sets whether the frame can be resized by the user
- Cooldown:SetScale(scale) - Sets the frame's scale factor
- Cooldown:SetScript("scriptType", handler) - Sets the widget's handler function for a script
- Cooldown:SetSize(width, height) - Sets the size of the region to the specified values
- Cooldown:SetToplevel(enable) - Sets whether the frame should automatically come to the front when clicked
- Cooldown:SetUserPlaced(enable) - Flags the frame for automatic saving and restoration of position and dimensions
- Cooldown:SetWidth(width) - Sets the region's width
- Cooldown:Show() - Shows the region
- Cooldown:StartMoving() - Begins repositioning the frame via mouse movement
- Cooldown:StartSizing() - Begins resizing the frame via mouse movement
- Cooldown:StopAnimating() - Stops any active animations involving the region or its children
- Cooldown:StopMovingOrSizing() - Ends movement or resizing of the frame initiated with [[docs/widgets/Frame/StartMoving|`:StartMoving()`]] or [[docs/widgets/Frame/StartSizing|`:StartSizing()`]]
- Cooldown:UnregisterAllEvents() - Unregisters the frame from any [[docs/events|events]] for which it is registered
- Cooldown:UnregisterEvent("event") - Unregisters the frame for an event
Script Handlers
- OnAttributeChanged(self, "name", value) - Run when a frame attribute is changed
- OnChar(self, "text") - Run for each text character typed in the frame
- OnDisable(self) - Run when the frame is disabled
- OnDragStart(self, "button") - Run when the mouse is dragged starting in the frame
- OnDragStop(self) - Run when the mouse button is released after a drag started in the frame
- OnEnable(self) - Run when the frame is enabled
- OnEnter(self, motion) - Run when the mouse cursor enters the frame's interactive area
- OnEvent(self, "event", ...) - Run whenever an [[docs/events|event]] fires for which the frame is registered
- OnHide(self) - Run when the frame's visbility changes to hidden
- OnKeyDown(self, "key") - Run when a keyboard key is pressed if the frame is keyboard enabled
- OnKeyUp(self, "key") - Run when a keyboard key is released if the frame is keyboard enabled
- OnLeave(self, motion) - Run when the mouse cursor leaves the frame's interactive area
- OnLoad(self) - Run when the frame is created
- OnMouseDown(self, "button") - Run when a mouse button is pressed while the cursor is over the frame
- OnMouseUp(self, "button") - Run when the mouse button is released following a mouse down action in the frame
- OnMouseWheel(self, delta) - Run when the frame receives a mouse wheel scrolling action
- OnReceiveDrag(self) - Run when the mouse button is released after dragging into the frame
- OnShow(self) - Run when the frame becomes visible
- OnSizeChanged(self, width, height) - Run when a frame's size changes
- OnUpdate(self, elapsed) - Run each time the screen is drawn by the game engine