View Single Post
01-25-12, 03:38 AM   #12
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Same do the animation widgets.

Another funny thing. You can make yourself a timer based on the animation widget.
Maybe not efficient but maybe more fun.

lua Code:
  1. --create animation timer
  2.     local b = CreateFrame("Frame")
  3.  
  4.     local t = b:CreateTexture()
  5.  
  6.     --anim
  7.     --http://wowprogramming.com/docs/widgets/Animation
  8.     local ag = t:CreateAnimationGroup()
  9.     local anim = ag:CreateAnimation("Rotation")
  10.     anim:SetDegrees(0)
  11.     anim:SetDuration(60)--in seconds
  12.     ag:Play()
  13.  
  14.     ag:SetScript("OnFinished", function(self, event, ...)
  15.       print('done')
  16.     end)

Afaik Tuller tried that in some of his cooldown mods aswell. Internally the animation widget is using onUpdate aswell (I guess). You even have the option to repeat the animation forever.

The thing is the CPU usage may fade but it is just transfered to Blizzard code by using the animation API.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 01-25-12 at 04:02 AM.
  Reply With Quote