Thread Tools Display Modes
03-12-07, 03:36 PM   #1
Maldelic
A Murloc Raider
Join Date: Feb 2007
Posts: 5
XML - Inverted Statusbar Possible?

I am designing a mod with a faction meter that I want to fill from right to left on the screen. I haven't done any of the scripting yet, but I need to get a few answers since this is pretty much my first XML project. I've set up the following code to what my intuition says it should be, but I can't find good documentation anywhere. No scripts are implemented in this XML yet.

- Is this set right to fill from right to left (if it is possible)
- Can you have textures in BACKGROUND and OVERLAY in a statusbar. (OVERLAY textures start hidden and show or hide based on scripts that I have not yet implemented.)
- How do I make the bar color change with the faction level?
- Are there any other glaring coding problems/noob errors that I am overlooking.
- Is this XML even near complete?

Code:
<StatusBar name="KUF_FactionMeter" minValue="1.0" maxValue="0.0" defaultValue="1.0">
	<Size>
		<AbsDimension x="119" y="28"/>
	</Size>
	<Anchor point="TOPLEFT">
		<Offset>
			<AbsDimension x="114" y="-67"/>
		</Offset>
	</Anchor>
	<Layers>
		<Layer level="BACKGROUND">
			<Texture name="$parent_Back" file="Interface\AddOns\KingdomUF\KUFImage\KUF-PFactionback.tga">
				<Size>
					<AbsDimension x="148" y="32"/>
				</Size>
				<Anchor point="TOPLEFT">
					<Offset>
						<AbsDimension x="-27" y="2"/>
					</Offset>
				</Anchor>
			</Texture>
		</Layer>
		<Layer level="OVERLAY">
			<Textures>
				<Texture name="$parent_Hs" file="Interface\AddOns\KingdomUF\KUFImage\KUF-Hs.tga" hidden = "true">
					<Size>
						<AbsDimension x="44" y="31"/>
					</Size>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="-27" y="2"/>
						</Offset>
					</Anchor>
				</Texture>
				<Texture name="$parent_Ha" file="Interface\AddOns\KingdomUF\KUFImage\KUF-Ha.tga" hidden = "true">
					<Size>
						<AbsDimension x="47" y="31"/>
					</Size>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="-27" y="2"/>
						</Offset>
					</Anchor>
				</Texture>
				<Texture name="$parent_U" file="Interface\AddOns\KingdomUF\KUFImage\KUF-U.tga" hidden = "true">
					<Size>
						<AbsDimension x="29" y="31"/>
					</Size>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="-27" y="2"/>
						</Offset>
					</Anchor>
				</Texture>
				<Texture name="$parent_N" file="Interface\AddOns\KingdomUF\KUFImage\KUF-N.tga" hidden = "true">
					<Size>
						<AbsDimension x="34" y="39"/>
					</Size>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="-27" y="2"/>
						</Offset>
					</Anchor>
				</Texture>
				<Texture name="$parent_Fr" file="Interface\AddOns\KingdomUF\KUFImage\KUF-Fr.tga" hidden = "true">
					<Size>
						<AbsDimension x="46" y="33"/>
					</Size>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="-27" y="2"/>
						</Offset>
					</Anchor>
				</Texture>
				<Texture name="$parent_Hn" file="Interface\AddOns\KingdomUF\KUFImage\KUF-Hn.tga" hidden = "true">
					<Size>
						<AbsDimension x="46" y="34"/>
					</Size>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="-27" y="2"/>
						</Offset>
					</Anchor>
				</Texture>
				<Texture name="$parent_Rv" file="Interface\AddOns\KingdomUF\KUFImage\KUF-Rv.tga" hidden = "true">
					<Size>
						<AbsDimension x="46" y="37"/>
					</Size>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="-27" y="2"/>
						</Offset>
					</Anchor>
				</Texture>
				<Texture name="$parent_Ex" file="Interface\AddOns\KingdomUF\KUFImage\KUF-Ex.tga" hidden = "true">
					<Size>
						<AbsDimension x="43" y="31"/>
					</Size>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="-27" y="2"/>
						</Offset>
					</Anchor>
				</Texture>
			</Textures>
		</Layer>
	</Layers>
	<BarTexture file="Interface\AddOns\KingdomUF\KUFImage\KUF-PFactionfill.tga"/>
	<BarColor r="0" g="1.0" b="0"/>
</StatusBar>
Edit: fixed code paste in

Last edited by Maldelic : 03-12-07 at 03:43 PM.
  Reply With Quote
03-15-07, 05:37 PM   #2
JoshBorke
A Chromatic Dragonspawn
 
JoshBorke's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 185
<edit>erm, switch the colors you want to use if you want to fill from right to left. transparent will probably mean you need to make your own status bar</edit>
you can have textures in the background and the overlay.
bar:SetStatusBarColor(<stuff>)
does the XML load into WoW?

you might want to look at www.wowwiki.com for more information

Last edited by JoshBorke : 03-15-07 at 05:43 PM.
  Reply With Quote
03-15-07, 07:16 PM   #3
Maldelic
A Murloc Raider
Join Date: Feb 2007
Posts: 5
I'm not that far on it to load it into WoW, but based on a few topics on the graphics forums I may have to resize all my images by adding more black space around the edges. Something to do with powers of 2.

It's a colored fill over a grey background, but the problem is the 'inverted fill' is what has to change colors so i'd have to cycle/recolor background images... I might just have to make my own statusbar for this. I'm going to have to do it for the two curved bars too and thats going to be an adventure in itself.

edit: I regularly camp WoWwiki, I just needed to get a second set of eyes on the code to help me get up to speed.

Last edited by Maldelic : 03-15-07 at 07:20 PM.
  Reply With Quote
01-03-08, 11:15 AM   #4
fad3d
A Defias Bandit
Join Date: Jan 2008
Posts: 2
It would be easier to use the status bar as normal with min being 0 and max being whatever and using the StatusBarName:SetOrientation() to change it from filling left to right to right to left. *think its StatusBarName:SetOrientation(1 or 0) 0 being from the left, not 100% though.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » XML - Inverted Statusbar Possible?

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