-
Posted by galvin on Thu, 10 Jun 2010 06:18:07
It doesn't like what I should type in for the button code. I think the book is assuming I know what to make. Heres the following code and it doesn't work.
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> <Button name="QuickCasterButtonTemplate" inherits="SecureActionButtonTemplate"> <Anchors> <Anchor point="BOTTOMLEFT" relativeTo="UIParent"> <Offset x="180" y="280" /> </Anchor> </Anchors> <Attributes> <Attribute name="type" value="spell"/> <Attribute name="spell" value="Whirlwind"/> <Attribute name="shift-spell*" value="Power Word: Shield"/> <Attribute name="ctrl-spell*" value="Renew"/> <Attribute name="unit" value="target"/> <Attribute name="*unit2" value="focus"/> <Attribute name="harmbutton" value="self"/> <Attribute name="*unit-self" value="player"/> </Attributes> <Scripts> <OnLoad> self:RegisterForClicks("AnyUp") _G[self:GetName().."Icon"]:SetTexture([[Interface\Icons\Spell_Holy_ImprovedResistanceAuras]]) </OnLoad> </Scripts> </Button> </Ui>
-
Posted by jnwhiteh on Thu, 10 Jun 2010 09:29:19
This is a production error that I sincerely apologise for. A line was cut off, and that's what's causing the issue. This is the addon code I have set for my Druid:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> <Button name="QuickCasterButton" inherits="ActionButtonTemplate,SecureActionButtonTemplate"> <Anchors> <Anchor point="BOTTOMLEFT" relativeTo="UIParent"> <Offset x="180" y="280" /> </Anchor> </Anchors> <Attributes> <Attribute name="type" value="spell"/> <Attribute name="spell" value="Healing Touch"/> <Attribute name="shift-spell*" value="Regrowth"/> <Attribute name="ctrl-spell*" value="Rejuvenation"/> <Attribute name="unit" value="target"/> <Attribute name="*unit2" value="focus"/> <Attribute name="harmbutton" value="self"/> <Attribute name="*unit-self" value="player"/> </Attributes> <Scripts> <OnLoad> self:RegisterForClicks("AnyUp") _G[self:GetName().."Icon"]:SetTexture([[Interface\Icons\Spell_Holy_ImprovedResistanceAuras]]) </OnLoad> </Scripts> </Button> </Ui>
-
Posted by galvin on Thu, 10 Jun 2010 17:31:46
Thanks, but why would you inherit ActionButtonTemplate? Isn't SecureActionButtonTemplate based on actionbuttontemplate and would have all the same functionality so why inherit both?
-
Posted by jnwhiteh on Thu, 10 Jun 2010 17:42:51
The ActionButtonTemplate is what actually causes the button to be displayed. Otherwise it has no size, no icons, etc.