Thread Tools Display Modes
08-02-14, 06:59 PM   #1
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
Cooldown animation not working

I know blizzard added new functions for beta. My current addon cooldowns don't work. I made some sample code to test, and I just cant figure out why the cooldown is not playing. I tried messing around with DrawEdge and DrawSwipe. I even tried using blizzards function CooldownFrame_SetTimer function as well. nothing works.

Code:
local F = CreateFrame('Frame', nil, UIParent)
F:SetPoint('RIGHT')
F:SetSize(100, 100)
local CooldownFrame = CreateFrame('Cooldown', nil, F)
local Texture = F:CreateTexture()
Texture:SetTexture([[Interface\PlayerFrame\UI-PlayerFrame-Deathknight-Blood]])
Texture:SetAllPoints(F)

CooldownFrame:Show()
CooldownFrame:SetPoint('CENTER', Texture, 'CENTER', 0, 0)
CooldownFrame:SetSize(100, 100)

CooldownFrame:SetDrawEdge(false)
CooldownFrame:SetDrawSwipe(true)
CooldownFrame:SetCooldown(GetTime(), 10)
 
08-03-14, 02:56 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
DrawEdge? You mean radial cooldown display is possible?
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
08-03-14, 09:27 AM   #3
Sio
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 3
Noticed this too when patching up some addons to get them to work. Basic fix for me was to just inherit from Blizzard's cooldown frame template when creating your cooldown frames.

E.g.
Code:
bar.cooldown = CreateFrame("Cooldown", bname .. "Cooldown", bar.frame, "CooldownFrameTemplate")

Once I did that they started working and I was able to mess around with enabling and disabling the radial edge texture. You can also change the swipe texture if you really want to shake things up:
Code:
Cooldown:SetSwipeTexture("Interface\\Garrison\\Garr_TimerFill-Upgrade")

Haven't really looked if there was a way to change the edge texture or not though.
 
08-03-14, 11:54 AM   #4
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
That's weird you have to use the template. Wonder why they made it work that way.
Thanks

Well beta is down, I'll give it a try later.

Yeah cooldown animation has a lot of options now looking at the new functions.
The texture cooldown functions take an r, g, b, a as section parameter.

Last edited by galvin : 08-03-14 at 11:56 AM.
 
08-03-14, 12:01 PM   #5
Sio
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 3
Originally Posted by galvin View Post
That's weird you have to use the template. Wonder why they made it work that way.
Thanks
Yeah I don't know if it's intended or not or just some consequence of how in flux certain parts of the UI systems are right now. It's just the easiest way I found to get it to work right now. And since that's all I was really looking for at the time I didn't dig a whole lot deeper.
 
08-03-14, 05:04 PM   #6
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
Have a new problem. I can't change the size of the cooldown. It ignores SetSize()

Fixed it, ClearAllPoints(), forgot the template had that in there.

Last edited by galvin : 08-03-14 at 05:19 PM.
 
 

WoWInterface » Site Forums » Archived Beta Forums » WoD Beta archived threads » Cooldown animation not working


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off