View Single Post
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)