Home Forum Downloads My Favorites Register FAQ

Go Back   EQInterface Forums > Developer Discussion > XML modification help.
User Name
Password

Reply
 
Thread Tools Display Modes
Old 10-07-2008, 09:24 PM   #1
zephur
A Gray Wolf
 
Join Date: Jan 2003
Server: Eci
Posts: 6
Default Anchors

Can anyone explain, or point me to something that explains, how the playerwindow's change from a <location> and <size> for items to this <topanchoroffset>, <bottomanchoroffset>, etc. works?

For example, how does it determine the size of things without a <size> anymore? How can I set things like the hp bar to NOT go all the way across? My old UI was set with the % out to the far right after the bar ended and it just wont seem to cooperate. Also tried moving the MT,MA, and puller icons to the bottom right and all it does is disappear if i manage to get it off the top at all.
zephur is offline   Reply With Quote
Old 10-07-2008, 09:36 PM   #2
Halelen
Lord Doljonijiarnimorinar
 
Join Date: Jan 2003
Server: Povar
Posts: 1,047
Interface Author - Click to view interfaces
Default

simple actually what it does with anchor is tell where you want to start example leftanchor offset 6...in 6 from left side begin draw, top offset 3...3 down from top is top edge bottom offset 12.... 12 down from top is bottom of object so ob ject is 9 high 12-3=9 right anchor offset3 menas 3 from right side so if window is 100 wide item starts at 6 and ends 3 from right side so total length =91.....100-6-3=91 so you have a sixe of <x>91<x> <y>9<y>


clear as mud???


Hal
Halelen is offline   Reply With Quote
Old 10-07-2008, 10:01 PM   #3
zephur
A Gray Wolf
 
Join Date: Jan 2003
Server: Eci
Posts: 6
Default

so your example is:
<LeftAnchorOffset>6</LeftAnchorOffset>
<TopAnchorOffset>3</TopAnchorOffset>
<BottomAnchorOffset>12</BottomAnchorOffset>
<RightAnchorOffset>3</RightAnchorOffset>

If the window was 50 wide, it would be the same as:
<location>
<x>3</x>
<y>6</y>
</location>
<size>
<CX>41</CX>
<CY>9</CY>
</size>

is that right?

Would the item always be 9 tall? Or would it change with window size like width does?

Also, what happens when one of the anchors is left out?
zephur is offline   Reply With Quote
Old 10-07-2008, 10:05 PM   #4
Halelen
Lord Doljonijiarnimorinar
 
Join Date: Jan 2003
Server: Povar
Posts: 1,047
Interface Author - Click to view interfaces
Default

got those backwards
<x>3</x>
<y>6</y>
</location>
<size>
<CX>41</CX>
<CY>9</CY>
</size>
should be
<x>6</x>
<y>3</y>
</location>
<size>
<CX>41</CX>
<CY>9</CY>
</size>
Halelen is offline   Reply With Quote
Old 10-07-2008, 10:06 PM   #5
Haliken
Quintessence of EQUI XML
 
Haliken's Avatar
 
Join Date: Sep 2002
Posts: 773
Interface Author - Click to view interfaces
Default

By default, all four sides of an object are anchored to the upper left.

This means if the left anchor offset is 5 and the right anchor offset is 55, no matter how wide the window is, the object will be 50 pixels wide and 5 pixels from the left edge. This is the same as a location X of 5, and size X of 50.

Now, if the RightAnchorToLeft is changed to false, the right anchor offset instead determines hor far from the right edge the object is. So a left anchor offset of 5, and a right anchor offset of 5 in a 70 wide window (excluding the border, because the border is subtracted from window width) will be 60 pixels wide.

You can also attach an object entirely to the right side, if both LeftAnchorToLeft and RightAnchorToLeft are false. This means with a left anchor offset of 55 and a right anchor offset of 5, the object would be 50 pixels wide.

---

The same holds true for top and bottom offsets, BottomAnchorToTop and TopAnchorToTop.

Enok
Haliken is offline   Reply With Quote
Old 10-07-2008, 10:08 PM   #6
zephur
A Gray Wolf
 
Join Date: Jan 2003
Server: Eci
Posts: 6
Default

Bah I always switch x, and y thx

Last edited by zephur : 10-07-2008 at 10:13 PM.
zephur is offline   Reply With Quote
Old 10-07-2008, 10:14 PM   #7
Halelen
Lord Doljonijiarnimorinar
 
Join Date: Jan 2003
Server: Povar
Posts: 1,047
Interface Author - Click to view interfaces
Default

i believe if it doesnt have the right anchor offset it uses the default size of the image on the .tga file now if you throw a right anchor in there then you can change the size from default

Hal
Halelen is offline   Reply With Quote
Old 10-07-2008, 10:21 PM   #8
zephur
A Gray Wolf
 
Join Date: Jan 2003
Server: Eci
Posts: 6
Default

<LeftAnchorOffset>6</LeftAnchorOffset>
<TopAnchorOffset>3</TopAnchorOffset>
<BottomAnchorOffset>12</BottomAnchorOffset>
<RightAnchorOffset>3</RightAnchorOffset>

so this item would not show at all UNLESS you add the RightAnchorToLeft set to false also?
zephur is offline   Reply With Quote
Old 10-07-2008, 10:26 PM   #9
Halelen
Lord Doljonijiarnimorinar
 
Join Date: Jan 2003
Server: Povar
Posts: 1,047
Interface Author - Click to view interfaces
Default

no it should show
Halelen is offline   Reply With Quote
Old 10-07-2008, 10:36 PM   #10
zephur
A Gray Wolf
 
Join Date: Jan 2003
Server: Eci
Posts: 6
Default

thx a lot for the help, i'll have to spend some time with it i guess.
makes a lot more sense to me now than when i wasted a day changing numbers to figure out what was going on
zephur is offline   Reply With Quote
Old 10-07-2008, 10:38 PM   #11
Halelen
Lord Doljonijiarnimorinar
 
Join Date: Jan 2003
Server: Povar
Posts: 1,047
Interface Author - Click to view interfaces
Default

hehe no problem it took me awhile to figure it out but once ya do it is so simple, good luck and look at enoks lil speel there that tells ya all ya need to know


Hal
Halelen is offline   Reply With Quote
Reply




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


All times are GMT -5. The time now is 06:12 PM.


vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI