Position of a StaticImage

gugus

02-01-2012 14:16:19

Hi everyone,

I would like to display an image in the center of the screen. I tried the following code:

<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="" layer="Windows" align="Left|Top" position="0 0 100 100" name="_Main">
<Widget type="StaticImage" skin="StaticImage" layer="Windows" align="Top|Left" position_real="0.5 0.5 1 1" name="JImage">
<Property key="Image_Texture" value="mwgui.png"/>
</Widget>
</Widget>
</MyGUI>


But don't know how to put the image in the center. How to do this?
I also noticed that the modifying the position of the window widget has no effect: the following code give the same results than the previous one. Why?
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="" layer="Windows" position="100 0 100 100" name="_Main">
<Widget type="StaticImage" skin="StaticImage" layer="Windows" align="Top|Left" position_real="0.5 0.5 1 1" name="JImage">
<Property key="Image_Texture" value="mwgui.png"/>
</Widget>
</Widget>
</MyGUI>


Thanks,
gugusWindows