Thread Tools Display Modes
10-12-05, 12:19 PM   #1
xmlover
A Fallenroot Satyr
Join Date: Oct 2005
Posts: 25
a simple XML question.....

nowadays, i try to write a smalle addon.

1.
i wanna the border and it's red title like Recap(Addon By Gello)......just a boder and a Red title.... 'cos I think that's pretty

i get the border,by inheriting the ToolTipBorder of wow

but the Red title.......i do not know......i am new to XML,so i can hardly read Recap's xml...


2. below the title i wanna a scrollbutton and a Tree_base contents viewing.....(e.g. like the left frame of myAddons )

like the QuestFrame

i saw QuestFrame.lua.....but even the word "scroll" is hardly seen in that file.....

so i am confused again .....how to combine the two...



anyone can help ....?


it's very kind of you to give a summary XML

you don't need to write all codes....just the main <Elements>(without the properties)

to help me understand the relationship of these things which i wanna combine....


it seems that i love XML and XML doesn't love me :-/
  Reply With Quote
10-13-05, 10:27 AM   #2
shouryuu
A Chromatic Dragonspawn
 
shouryuu's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 150
Well I'm not very good at XML, but here is a tutorial for XML in WoW
http://www.wowwiki.com/XML_User_Interface

I think it's a nice place to start. I doesn't explain how to do what you want, but it might however help you understand Gello's XML
Good luck!
  Reply With Quote
10-13-05, 12:45 PM   #3
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
On the title, the red background is kind of a cheat and it uses a white texture and does a SetVertexColor to change it from red/green/blue depending on mode. But poking around in UI.xsd there's a cool Gradient tag that does the same thing.

So for a titlebar:

Make the tooltip border as you did
Add a thin bar that spans the bottom of the titlebar (Interface\TradeSkillFrame\UI-TradeSkill-SkillBorder is the one I use)
Stretch a white texture (Interface\ChatFrame\ChatFrameBackground) across the titlebar area, then add Gradient min/max with orientation="VERTICAL" (default is horizontal--ItemRack options/help windows use it)

Here's an example:
Code:
<Layer level="ARTWORK">
	<Texture file="Interface\TradeSkillFrame\UI-TradeSkill-SkillBorder">
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset>
					<AbsDimension x="5" y="-24"/>
				</Offset>
			</Anchor>
			<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="-5" y="-32"/>
				</Offset>
			</Anchor>
		</Anchors>
		<TexCoords left="0.1" right="1.0" top="0" bottom="0.25"/>
	</Texture>
	<Texture file="Interface\ChatFrame\ChatFrameBackground">
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset>
					<AbsDimension x="5" y="-5"/>
				</Offset>
			</Anchor>
			<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="-5" y="-32"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Gradient orientation="VERTICAL">
			<MinColor r="0.1" g="0.1" b="0.1"/>
			<MaxColor r="0.5" g=".1" b=".1"/>
		</Gradient>
	</Texture>
</Layer>
On the scrollable tree, you'll probably want to create a FauxScrollFrame window with buttons it repaints as the window scrolls. There's nothing really close to built-in for a scrollable tree. A tutorial on FauxScrollFrames is here: http://www.wowwiki.com/HOWTO:_Make_a...lFrameTemplate.
  Reply With Quote
10-13-05, 10:20 PM   #4
xmlover
A Fallenroot Satyr
Join Date: Oct 2005
Posts: 25
shouryuu
thx for the GREAT site.....GREAT site.....GREAT SITE......



Gello

i finally got what i want for the main frame.....thx for your stick-to-itive reply.......really helps!

when i wanna to sort things.... i think the left part of Auction House is more good...

so I delete that scrollframe

OK,thx for ur help

i will be back when I lost again
  Reply With Quote
10-26-05, 05:26 AM   #5
xmlover
A Fallenroot Satyr
Join Date: Oct 2005
Posts: 25
hmm. i come with a little questions.

1. i saw some code of some addons.

in their initialization part, they set the texture and some properties of some elements of the GUI.

why don't they set them in the XML.i mean if they set these in XML,won't it be better way?


2. which made the addons use more MEMORY?

i mean when my PC is slow. and some addons will made WOW run in a lower FPS.

why ?

lots of events registration did that?


3. XML is much harder than lua... 'cos its words is customed by somebody......

i know read the source from Offical(interface.mpq) is a good way

but I find lot's of new things there. i mean ,properties to elements.....

i try to read UI.xsd, but faild......

is there any info of the WOW XML Definition?
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » a simple XML question.....


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