What's merit of using "CooldownFrameTemplate" over "AuraButtonTemplate" for auras?
Hi all,
So, this question would be an extension from my previous thread here. If there's such issue (well... can't be said as an issue if that's what "CooldownFrameTemplate" is meant to be doing as lightspark says, but I mean in this case), why does oUF utilizes "CooldownFrameTemplate" for auras element rather than "AuraButtonTemplate" or "BuffButtonTemplate"/"DebuffButtonTemplate"? To be honest, it is not just oUF. Raven also utilizes "CooldownFrameTemplate", as well as the custom buff frame tutorial that I have seen. Why would all these addons/libraries utilize "CooldownFrameTemplate" with Cooldown frame over "AuraButtonTemplate"? |
Cuz it's used for cooldown frames, duh...
Cooldown spiral is a frame, it doesn't magically appear out of nowhere, you have to create it via CreateFrame("Cooldown"), and it has to inherit CooldownFrameTemplate to work properly. AuraButtonTemplate is a virtual Button that has Icon, Count and Duration regions, it has no cooldown spiral. Why would anyone want to use it? O_o Even if one used it, one would have to reset all points, sizes, etc. That's a waste of time and resources. |
To add to that, oUF doesn't just use CooldownFrameTemplate -- each aura icon is a button object with a texture region (for the icon image), a font string (for the count text), etc. in addition to a cooldown child object (which is what inherits from the CooldownFrameTemplate).
Auras (table) -- oUF element [1] (object: Frame > Button) -- an individual aura icon cd (object: Frame > Cooldown) -- the cooldown spiral icon (object: Region > Texture) -- the (de)buff's icon image count (object: Region > FontString) -- text showing the number of stacks overlay (object: Region > Texture) -- a border image colored by dispel type, if enabled stealable (object: Region > Texture) -- a border image shown if the buff can be stolen |
Quote:
|
Quote:
But yeah, it probably was a poor choice of words, was too lazy to go into detail. |
Quote:
Additionally, I tried to deal with the concern that I had as you advised, but after I found that the raven resolves that matter I'm still eager to fix this. Thus I had a close look at raven's code as well as its saved variables, but with my lack of skills, can't figure out where it actually does a trick... (I only found that it; 1. calls SetCooldown function on every update 2. saves duration of aura inside its saved variable) I might have to ask the author of Raven for an idea if he is not fussed with helping me :confused: Quote:
I was so tired when I posted this thread and forgot that Cooldown frame is just a part of Button frame :p Thank you for reminding me! |
Quote:
I mean, I understand why Raven does it, cuz it's dedicated aura tracking addon, it's often used in PvP, so having precise timers even after UI reload might be important. TBH, I think it's no biggie. But that's just my opinion on this matter, it's your time and you decide how to use it. |
Quote:
|
Quote:
|
All times are GMT -6. The time now is 05:18 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI