Thread Tools Display Modes
11-19-08, 02:11 AM   #1
Rabbit007
A Black Drake
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 81
XML help please :) !!!

As many people have figured out "well the ones I talk with anyway" i am attempting to learn lua and xml to be able to create my own ui compilation.
I have done well since i actually started to try and write the code (yesterday) having no knowledge of coding beforehand.

The problem i am having is i got my texture to load into wow but i can't get it to go to the VERY bottomleft (flush against the edges) but i can get it to the bottom left of the UIParent. SS and XML code below.

The 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">
<Frame name="ChatGraphic" parent="UIParent" visible="true" frameStrata="BACKGROUND">
<Size>
<AbsDimension x="512" y="512"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT"/>
</Anchors>
<Backdrop bgFile="Interface\Addons\KranixUI\ChatFrame" tile="false"/>
</Frame>
</Ui>

The Screenshot:


I am trying to get the image flush against the bottom left borders of the screen

thanks,
rabbit

Last edited by Rabbit007 : 11-19-08 at 02:22 AM.
  Reply With Quote
11-19-08, 02:39 AM   #2
Yhor
A Pyroguard Emberseer
 
Yhor's Avatar
Join Date: May 2007
Posts: 1,077
I promise I'm more of a newb than you .

That being said, it looks like <Anchor point="BOTTOMLEFT"/> is being hindered by your default Mainbar and your <AbsDimension x="512" y="512"/>. Please wait for someone who would -know- this to be fact though, because I'm really new at this myself.
  Reply With Quote
11-19-08, 07:47 AM   #3
Rabbit007
A Black Drake
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 81
Hehe well i fixed it... i actually created my own parent frame and the put the texture on the frame i created see below

<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">
<Script file="KranixUI.lua"/>
<Frame name="KranixUI" frameStrata="BACKGROUND" hidden="false" parent="UIParent" toplevel="false">
<Anchors>
<Anchor point="BOTTOMRIGHT" relativeTo="UIParent" relativePoint="BOTTOMRIGHT" />
<Anchor point="BOTTOMLEFT" relativeTo="UIParent" relativePoint="BOTTOMLEFT" />
<Anchor point="TOPRIGHT" relativeTo="UIParent" relativePoint="TOPRIGHT" />
<Anchor point="TOPLEFT" relativeTo="UIParent" relativePoint="TOPLEFT" />
</Anchors>
</Frame>

<Frame name="ChatGraphic" parent="KranixUI" visible="true" frameStrata="BACKGROUND">
<Size>
<AbsDimension x="512" y="256"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT"/>
</Anchors>
<Backdrop bgFile="Interface\Addons\KranixUI\ChatFrame" tile="false"/>
</Frame>
</Ui>

I also went in and edited the texture then reloaded it and now it fits perfectly against the edges. I would post a screenie but the textures can only be used for private use and don't want the authors Texture get ripped from the screenie and put up here .
  Reply With Quote
11-19-08, 07:50 AM   #4
Rabbit007
A Black Drake
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 81
I have noticed one thing... (well for me it is like this).. xml explains itself rather well just by looking at the code used but when it comes to lua it gets very complex... i don't even know where to start there lol... I just learend how to put textures into wow but when it comes to the lua it's kinda../facepalm like for me lol.

and i haven't even scratched the tip of xml... i need a book for dummies type thing i think lol.
  Reply With Quote
11-19-08, 10:48 AM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I highly suggest that you get the book World of Warcraft Programming.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
11-19-08, 10:48 AM   #6
Psoewish
A Scalebane Royal Guard
 
Psoewish's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 447
Originally Posted by Rabbit007 View Post
I have noticed one thing... (well for me it is like this).. xml explains itself rather well just by looking at the code used but when it comes to lua it gets very complex... i don't even know where to start there lol... I just learend how to put textures into wow but when it comes to the lua it's kinda../facepalm like for me lol.

and i haven't even scratched the tip of xml... i need a book for dummies type thing i think lol.
I highly recommend a book if you're considering to seriously learn how to do this stuff. Sure, there way me a lot of sources available on the internet, but I've found that learning something step-by-step from a good book is the easiest way.

But it costs money that way, and most people nowadays want everything for free.
  Reply With Quote
11-19-08, 11:46 PM   #7
Rabbit007
A Black Drake
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 81
Originally Posted by Psoewish View Post
I highly recommend a book if you're considering to seriously learn how to do this stuff. Sure, there way me a lot of sources available on the internet, but I've found that learning something step-by-step from a good book is the easiest way.

But it costs money that way, and most people nowadays want everything for free.
Hehe well it's not that i don't want to pay for it.. just.. if i can figure things out here and there till i know everything or slowly teach myself overtime (as i am in no rush) as a hobby... i say to myself why pay for it? not in any hurry .

To get back to the topic i think i am gonna stick with mainly lua as xml is easy to pickup even for starters but once you know lua it seems to make things much easier.

This line of code in lua

--Chat Frame Background Graphic--

local ChatBackground = CreateFrame("Frame",nil,UIParent)
ChatBackground:SetFrameStrata("BACKGROUND")
ChatBackground:SetWidth(512)
ChatBackground:SetHeight(256)

local t = ChatBackground:CreateTexture(nil,"BACKGROUND")
t:SetTexture("Interface\\AddOns\\Kranix\\Textures\\ChatFrame.tga")
t:SetAllPoints(ChatBackground)
ChatBackground.texture = t

ChatBackground:SetPoint("BOTTOMLEFT",0,0)
ChatBackground:Show()
did the samething that the xml above did when it came to putting in textures.. and honestly just felt less complicated
  Reply With Quote
11-20-08, 11:49 AM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
You don't need to create a separate texture to put your art in. Just put it in your frame as its background.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » XML help please :) !!!


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