Custom XML Template : strange alignment issue
Hello all.
I trying to create custon XML Templates for fancy personnal menus, but I do have an issue with alignment between background and buttons.
Just a small exemple, and a small image.
1st, the very simple XML template, 1 vertical column of 4 32x32 buttons :
And now, the result :
As you can see, I have a weird vertical shift of about 15 pixels between the top of the "window" element type background and the 1st button (the horizontal shift is obviously normal, set like this to see the red background more clearly)
Is it normal, a bug, or did I missed something? :p
And if it's normal, is there a way to know the exact value of this shift?
I trying to create custon XML Templates for fancy personnal menus, but I do have an issue with alignment between background and buttons.
Just a small exemple, and a small image.
1st, the very simple XML template, 1 vertical column of 4 32x32 buttons :
- Code:
<ISUI>
<template name='MyButton'>
<Width>32</Width>
<Height>32</Height>
<Alpha>1.0</Alpha>
<BackgroundColor>FF0F0F0F</BackgroundColor>
<Border>1</Border>
<BorderColor>FF00FF00</BorderColor>
<Text>1</Text>
<Font template='MyButton.Font'>
<Color>FFFFFFFF</Color>
<Size>14</Size>
<Name>prototype</Name>
</Font>
<Texture/>
<TextureHover/>
<TexturePressed/>
</template>
<Window name='4x1_Vert_Template'>
<Width>32</Width>
<Height>134</Height> <!-- Window Height = (4 * Button Height size) + 3 * space between buttons , so 4*32 + 3*2 = 134 -->
<Alpha>1.0</Alpha>
<BackgroundColor>FFFF0000</BackgroundColor>
<Border>0</Border>
<Title>${This.GetMetadata[menu].Escape}</Title>
<Visible>1</Visible>
<Children>
<Frame Name='buttons'>
<BackgroundColor>00000000</BackgroundColor>
<Width>100%</Width>
<Height>100%</Height>
<Children>
<Button name='btn1' template='MyButton'>
<X>15</X>
<Y>0</Y> <!-- The 1st button should normaly be placed at the top of the window -->
<Text>Btn1</Text>
</Button>
<Button name='btn2' template='MyButton'>
<X>15</X>
<Y>34</Y> <!-- 2nd button 34 pixels lower , and so on -->
<Text>Btn2</Text>
</Button>
<Button name='btn3' template='MyButton'>
<X>15</X>
<Y>68</Y>
<Text>Btn3</Text>
</Button>
<Button name='btn4' Template='MyButton'>
<X>15</X>
<Y>102</Y>
<Text>Btn4</Text>
</Button>
</Children>
</Frame>
</Children>
</Window>
</ISUI>
And now, the result :
As you can see, I have a weird vertical shift of about 15 pixels between the top of the "window" element type background and the 1st button (the horizontal shift is obviously normal, set like this to see the red background more clearly)
Is it normal, a bug, or did I missed something? :p
And if it's normal, is there a way to know the exact value of this shift?