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) |
DrawEdge? You mean radial cooldown display is possible?
|
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. |
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. |
Quote:
|
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. |
OT: What is the new SwipeTexture element within the cooldown frame good for?
E: Oh, ok. This is the new cooldown texture itself. :D So, the cooldowns are not longer rendered into the UI by the game engine itself? Is there any way to reference the texture object? The point is: I would like to get rid of it ... without removing or hiding the cooldown frame itself. I've used <cooldownframe>:SetAlpha(0) before WoD. But the SwipeTexture child ignores this. :/ E1: Ok. Nevermind. Setting the texture to an empty texture via SetSwipeTexture works. :) |
This is the default ActionButton UpdateCooldown function (Build 18663)
Lua Code:
|
All times are GMT -6. The time now is 10:25 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI