View Single Post
03-12-13, 06:23 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
First of all, I'd highly recommend rewriting your frames in Lua, and avoid using XML.

Secondly, to add a cooldown, you create a new frame with the "Cooldown" object type (instead of "Frame" or "Button"), parent and anchor to your frame, give it the same size as your frame (or use SetAllPoints, or SetPoint if you need offsets). Then :Show() your cooldown and use :SetCooldown(...) to start the sweeping animation.

See also:
* http://www.wowpedia.org/Widget_API#Cooldown
* http://www.wowpedia.org/API_Cooldown_SetCooldown (there's a code example here)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote