Thread Tools Display Modes
03-21-13, 08:11 PM   #21
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
I only skimmed the 2nd block of code (seemed shorter )

Your CreateTrapButton() function where it makes the button and its associated cooldown needs to store the reference to the cooldown on the button frame if you want to refer to it elsewhere as button.cooldown

Specifically this
Code:
-- Add a cooldown to the button:
local cd = CreateFrame("Cooldown", "$parentCooldown", button, "CooldownFrameTemplate")
cd:SetAllPoints(true)
cd:Hide()
needs this line added to it:
Code:
button.cooldown = cd
  Reply With Quote
03-21-13, 08:45 PM   #22
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Good catch.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
03-21-13, 09:06 PM   #23
shamby
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 17
Wow. Success!!!

Guys, I am eternally grateful for your time, effort and patience. I would have surely been stuck in .xml and stuck with no cooldowns. Thank you.

Last edited by shamby : 03-21-13 at 09:07 PM. Reason: typo
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » How to incorporate cooldowns on clickable button frames generated in xml file.


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