Thread Tools Display Modes
02-10-09, 05:25 PM   #1
ThunderNimbus
A Defias Bandit
Join Date: Jan 2007
Posts: 2
Beginner Question Question

I just got in to creating Addons for WoW the other day, and have been using the "World of Warcraft Programming" Book as a Guide. I'm trying to make a simple button frame in the center of the screen (I'll allow it to be moveable later) with the Dialog background and frame. I'm sure I just have some small error in here (it's modified from an example in the book) but I'm at a loss to find it. Any input would be appreciated.

Code:
<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="TradeAdvertiserFrame" parent="UIParent" enableMouse="true" movable="true" frameStrata="LOW">

	<Size x="100" y="40"/>

	<Anchors>
		<Anchor point="CENTER" relativePoint="CENTER" relativeTo="UIParent">
		</Anchor>
	</Anchors>


	<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" 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>

	<Layers>
		<Layer level="OVERLAY">
			<FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="CENTER" setAllPoints="true" text="TradeAdvertiser"/>
		</Layer>
	</Layers>


	</Button>
</Ui>

Last edited by ThunderNimbus : 02-10-09 at 07:42 PM.
  Reply With Quote
02-10-09, 06:25 PM   #2
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
That's quite easy to solve. There's a needless equal:

<AbsInset left="11" right="12" top="12"= bottom="11"/>
  Reply With Quote
02-10-09, 07:42 PM   #3
ThunderNimbus
A Defias Bandit
Join Date: Jan 2007
Posts: 2
Must be something else I'm missing as well. Took out the equal sign and it's still not showing.
  Reply With Quote
02-11-09, 01:00 AM   #4
Gemini_II
A Molten Giant
 
Gemini_II's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 762
I suck at coding but I noticed in your <Layers> section...
Code:
justifyH="CENTER"
should read (unless I'm mistaken then ignore me!)
Code:
justify="CENTER"
__________________
Retired prior to 3.2, before all challenge was removed.

  Reply With Quote
02-11-09, 08:22 AM   #5
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Code:
justify="CENTER"
No Sir.
justifyV is a valid attribute.

Must be something else I'm missing as well. Took out the equal sign and it's still not showing.
Just tested your code. It's valid and working.
Please show the toc file and (if there are any) the lua files.
  Reply With Quote
02-11-09, 09:22 AM   #6
Mera
Retired of WoW, In ESO :)
 
Mera's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 331
try puting a

<Offset>
<AbsDimension x="0" y="0"/>
</Offset>

inside <Anchor></Anchor>
__________________
If you need to reach me I'm in ESO, @class101 or "Fathis Ules i"
addons: SpamBayes, BrokerCPU
projects: ThunderBayes
Mera[xeh]? - La CroisadeEcarlate (wow)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Beginner Question Question

Thread Tools
Display Modes

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