EQInterface Forums

EQInterface Forums (http://www.eqinterface.com/forums/index.php)
-   XML modification help. (http://www.eqinterface.com/forums/forumdisplay.php?f=30)
-   -   Anchors (http://www.eqinterface.com/forums/showthread.php?t=19886)

zephur 10-07-2008 09:24 PM

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.

Halelen 10-07-2008 09:36 PM

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

zephur 10-07-2008 10:01 PM

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?

Halelen 10-07-2008 10:05 PM

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>

Haliken 10-07-2008 10:06 PM

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

zephur 10-07-2008 10:08 PM

Bah I always switch x, and y thx

Halelen 10-07-2008 10:14 PM

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

zephur 10-07-2008 10:21 PM

<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?

Halelen 10-07-2008 10:26 PM

no it should show

zephur 10-07-2008 10:36 PM

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

Halelen 10-07-2008 10:38 PM

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


All times are GMT -5. The time now is 12:37 AM.

vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.