Staticimage params in LayoutEditor [SOLVED]

dest

09-12-2008 01:08:07

Howdy,
Just playing around with the layout editor trying to get a section of an image to display. Creating a staticimage widget and setting the texture to "core.png" works fine. However when I try to set the coord, tile or index parameters the image either disappears completely or doesnt change at all. I was looking at the following code from TextureView.layout in the Font demo to try to figure things out -
<Widget type="StaticImage" skin="StaticImage" position="15 15 100 100" name="image_Back">
<Property key="Image_Texture" value="core.png"/>
<Property key="Image_Coord" value="678 54 1 1"/>
<Property key="Image_Tile" value="1 1"/>
<Property key="Image_Index" value="0"/>
<Widget type="StaticImage" skin="StaticImage" position="25 25 50 50" name="image_Texture"/>
</Widget>


I have of course tryed many different numbers in the coord parameter, which i presumed should look something like "0 0 100 100" for a 100x100 rect of the top left corner, but havent got anything to work. The tile index seems clear enough. Could someone explain what the value "1 1" does in the tile parameter? Any help would be much appreciated.
Cheers!

dest

09-12-2008 20:44:11

Got this workin by just using image->setImageCoord() in my code rather than specifying in the layout editor.