Thread Tools Display Modes
03-26-07, 07:03 PM   #1
naotom
A Defias Bandit
Join Date: Mar 2007
Posts: 2
Adding Buttons

Hi,

I've been looking at creating my own addons, and so far have managed to get something basic with /commands and event driven functions (the lua part in general isnt to hard). I have managed to create a frame for it, the frame im using follows the general structure,

<Frame>
<Layers>
</Layers>
<Scripts>
</Scripts>
</Frame>

which creates a blank draggable frame.

I've been trying to add a button to this frame using the following code, (I am adding this code after the </Layers> tag and before <Scripts>.)

Code:
<Frames>
 <Button name="TomButton_1" inherits="UIPanelButtonTemplate" text"Click Me">
	<Size>
	 <AbsDimension x="80" y="22">
	</Size>
	<Anchors>
	 <Anchor point="CENTER" relativeTo="TomFrame1"/>
	</Anchors>
	<Scripts>
	 <OnClick>IGotClicked()</OnClick>
	</Scripts>
 </Button>
</Frames>
Adding that code to the xml file and reloading the ui makes the frame disappear, and the addon stop running compltetly. Any advice on where i'm going wrong?

Also whilst I'm here, most of the tutorials or advice threads seem the link to a tutoral at mmohell, which is currently offline, and the page isnt in the google cache is there a copy of it about anywhere?

Thanks in advance.
  Reply With Quote
03-27-07, 07:22 AM   #2
naotom
A Defias Bandit
Join Date: Mar 2007
Posts: 2
sorry, wasnt closding the AbsDimension tag in size.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Adding Buttons


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