Difference between revisions of "Property Element"

1,429 bytes added ,  00:40, 19 December 2009
imported>JRoush
imported>JRoush
Line 34: Line 34:


== Textured ==
== Textured ==
Properties specific to the [[Menu Element#Image|Image Element]]
Properties specific to the [[Menu Element#Image|Image Element]].  Note that the texture displayed by an image element is automatically cropped to fit within the elements width and height.
*Filename
*'''Filename''' (String) Specifies the .dds texture file that the element will display.  The file path should be specified relative to the ''Oblivion\Data\Textures\'' directory.
*'''Zoom''' (Numeric) Specifies the zoom percentage of the image. Setting it to 0 will result in a hidden image and can be larger than 100 to magnify the source texture. When using a value of -1 the image will be resized according to the width and height of the element (but not cropped).  
*'''Zoom''' (Numeric) Specifies the zoom percentage of the image. Setting it to 0 will result in a hidden image and can be larger than 100 to magnify the source texture. When using a value of -1 the image will be resized to fit the width and height of the element (and therefore not cropped).
*CropX,CropY
*'''CropX,CropY''' (Numeric) Specify the point on the texture, in pixels, that will be placed at the upper left hand corner of the image element.  Because the texture is cropped to fit inside the image element, this essentially cuts CropX pixels off of the left of the image and CropY off of the bottom.  '''Note:'''  CropX/CropY are calculated ''after'' the zoom property has been applied, so the point (5,10) in the original image would be (10,20) after a 200% zoom.
 
Examples using all_small_icons.dds (a 384x32 texture containing twelve 32x32 icons in a horizontal row)
<image name="MyIcon">
    &lt;!-- Display the gold piece icon, which is 8th from the left --&gt;
    <filename> Menus\Shared\all_small_icons.dds </filename>
    <width> 32 </width>
    <height> 32 </height>
    <cropx> 224 </cropx> &lt;-- 7*32 = 224 --&gt;
</image>
 
<image name="MyIcon">
    &lt;!-- Same as above, but at 200% size --&gt;   
    <filename> Menus\Shared\all_small_icons.dds </filename>
    <zoom> 200 </zoom>
    <width> 64 </width> &lt;-- 32*200% = 64 --&gt;
    <height> 64 </height>
    <cropx> 448 </cropx> &lt;-- 7*32*200% = 448 --&gt;
</image>


== Text ==
== Text ==
Anonymous user