View Single Post
03-13-13, 11:45 AM   #4
shamby
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 17
Still unable to get the cooldowns on buttons.

Thank you guys for your informative and rapid responses. I agree that .lua would be a better choice, especially for what I eventually want to do in the Addon. But I do have a better understanding of what needs to be done here. I have researched the material you've provided and through trial and error am still unable to get a CD on the button(s). There's 4 Trap buttons and the Launcher on this set up and I have included part of the beginning .xml. I have been working on the 1st trap-Explosive- and if you would again point me in the proper direction I will be able to get back to the 'Daily' marathon that is MoP. Thank you.
Sorry--have never included attachments before and not sure so I am placing an original part of the .xml here devoid of any changes that I tried.
<Script file="EZTrap.lua" />
<Frame name="Frame1" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
<Size>
<AbsDimension x="110" y="110" />
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset x="-1" y="-144" />
</Anchor>
</Anchors>
<Backdrop bgFile="Interface\FrameGeneral\UI-Background-Rock" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11" />
</BackgroundInsets>
<TileSize>
<AbsValue val="32" />
</TileSize>
<EdgeSize>
<AbsValue val="32" />
</EdgeSize>
</Backdrop>
<Frames>
<Button name="Explosive" inherits="SecureActionButtonTemplate">
<Size>
<AbsDimension x="28" y="28" />
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset x="32" y="30" />
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:RegisterForClicks("LeftButtonUp");
self:SetAttribute("type1", "spell");
self:SetAttribute("spell1", "Explosive Trap");
</OnLoad>
</Scripts>
<NormalTexture file="Interface\Icons\Spell_fire_selfdestruct" />
</Button>
  Reply With Quote