Thread Tools Display Modes
12-26-07, 10:06 AM   #1
huntsfromshadow
A Kobold Labourer
Join Date: Dec 2007
Posts: 1
Help with XML and MoneyFrameTemplate...

Having a problem with the XML UI of an addon I'm building.
Can anyone give any advice?

I'm trying to write (to learn addon wirting) a little addon that keeps track of how much money I've earned during my play session.

I'm suck on the UI.

This XML below creates a dialog in the middle of the scree, and I see both the Text and the moneyframe in the right places, but the moneyframe has no text. Icons for the gold, silver, and copper, but no text.

Does anyone have any advice? I have looked at the ShowMeTheMoney Addon but i can't seem to get just the UI of that part to work.

I'd like to know 'why' it is doing this as well. Dosen't help me to have a solution if I don't understand why it works.

Code:
<Frame name="CashFlow_Dialog" hidden="true" virtual="true" frameStrata="DIALOG" parent="UIParent">
		<Size><AbsDimension x="200" y="200" /></Size>
		<Anchors><Anchor point="CENTER" /></Anchors>
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<TileSize><AbsValue val="32"/></TileSize>
			<EdgeSize><AbsValue val="32"/></EdgeSize>
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
		</Backdrop> 
</Frame>
	
<Frame name="CashFlow_CurrentCash" hidden="false" inherits="CashFlow_Dialog" moveable="true" enableMouse="true">
	<Layers>
		<Layer level="Artwork">
			<FontString name="$parent_Text1" inherits="GameFontNormal" text="Current Cash:">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset><AbsDimension x="10" y="-10"/></Offset>
					</Anchor>
				</Anchors>
			</FontString>		
		</Layer>
	</Layers>

	<Frames>
		<Frame hidden="false" inherits="SmallMoneyFrameTemplate" >
			<Anchors><Anchor point="CENTER" /></Anchors>
				<Scripts>
					<OnLoad>
						MoneyFrame_SetType("STATIC");
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
	</Frame>
  Reply With Quote
12-28-07, 06:36 PM   #2
mulesh
A Chromatic Dragonspawn
 
mulesh's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 193
Your frame needs script handlers and functions to collect and render the players money.

If you have the WoW AddOn Kit, look at the MoneyFrame.XML and MoneyFrame.LUA files, particularly the "SmallMoneyFrameTemplate" that you are using.
__________________
"Don"t tase me bro!" ~ Andrew Meyer
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Help with XML and MoneyFrameTemplate...


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