<onright> in group control
#1
There's something I find odd about the <right> positioning.

If I use the following:

PHP Code:
<control type="group">
    <
width>256</width>
    <
height>99</height>
    <
control type="image">
        <
right>25</right>
        <
bottom>25</bottom>
        <
width>256</width>
        <
height>99</height>
        <
texture>sometexture.png</texture>
    </
control>
        <
control type="label">
        <
right>25</right>
        <
bottom>25</bottom>
        <
width>256</width>
        <
label>some text</label>
    </
control>
</
control

All works like expected, both the image and the label show up in the bottom right corner of the screen at the desired coordinates.

However, when I move the coordinates to the group control:

PHP Code:
<control type="group">
    <
right>25</right>
    <
bottom>25</bottom>
    <
width>256</width>
    <
height>99</height>
        <
control type="image">
        <
width>256</width>
        <
height>99</height>
        <
texture>sometexture.png</texture>
    </
control>
    <
control type="label">
        <
width>256</width>
        <
label>some text</label>
    </
control>
</
control

the controls are placed in the bottom left of the screen as if ignoring the <right>

The results should be the same right?
Reply
#2
What build are you using because it's the opposite for me?

As for the reason it's the way it is for me - it's because without the co-ordinates in the group they are assumed to be 0,0 and the controls inside it are measured from the right/bottom edges - position 256,99. When they're in the group they're measured from the left/top edges - position 281r,124r.
Reply
#3
I just updated to today's build, but I was using a build that wasn't older than a week or so. Not sure which one.

It's probably just me, but I still think it's a bit odd. I feel this should be measured in the same way, and unless specified (further) in the controls inside the group they should inherit what the group is set to?
Reply
#4
Top, left image/label is without group co-ordinates so they either taken from a parent group or in this case assumed to be 0,0 - so the image and label's right and bottom edges are measured from the right and bottom edge of the group respectively.

Bottom, right image/label is with group co-ordinates so the group's right and bottom edges are measured from the right and bottom of the screen respectively - so the image and label's co-ordinates are taken from the group's left/top corner.

Image
Reply
#5
Ah, I get you mean now, thanks Hitcher
Reply

Logout Mark Read Team Forum Stats Members Help
<onright> in group control0