Difference between revisions of "ISUI"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 10: Line 10:
 
In addition to the attributes listed below, the <tt>begin tag</tt> for the element must include a Name, like so:
 
In addition to the attributes listed below, the <tt>begin tag</tt> for the element must include a Name, like so:
 
  <Button Name="My Button">
 
  <Button Name="My Button">
==== XML Attributes ====
+
==== XML Properties ====
 
{| border="1" cellpadding="2"
 
{| border="1" cellpadding="2"
 
!width="15%"|Tag  
 
!width="15%"|Tag  
Line 45: Line 45:
 
It is also important to note that if none of Left, Top, Right, or Bottom are given, the entire base image will be used
 
It is also important to note that if none of Left, Top, Right, or Bottom are given, the entire base image will be used
  
==== XML Attributes ====
+
==== XML Properties ====
 
{| border="1" cellpadding="2"
 
{| border="1" cellpadding="2"
 
!width="15%"|Tag  
 
!width="15%"|Tag  

Revision as of 22:20, 8 June 2005

Overview

Custom Interfaces in XML

UI Element Base Type


Overview

All UI elements derive from a base type at the lowest level. What this means is all elements have the attributes defined below, in addition to any they add themselves. They may change the default values of any of the below attributes, but will not generally do so.

In addition to the attributes listed below, the begin tag for the element must include a Name, like so:

<Button Name="My Button">

XML Properties

Tag Description Default
X Leftmost coordinate for this element, relative to its parent element. This setting can be a percentage (of its parent's width), indicated with %. A percentage will cause the element to recalculate its position when its parent is resized. 0
Y Topmost coordinate for this element, relative to its parent element. This setting can be a percentage (of its parent's height), indicated with %. A percentage will cause the element to recalculate its position when its parent is resized. 0
Width Total width of this element. This setting can be a percentage (of its parent's width), indicated with %. A percentage will cause the element to recalculate its position when its parent is resized. 0
Height Total height of this element. This setting can be a percentage (of its parent's height), indicated with %. A percentage will cause the element to recalculate its position when its parent is resized. 0
Visible 1 if the element should be visible, 0 if not 1



UI Texture Definition


Overview

All ISUI texture definitions use the same basic parts. The base image, a "color key" (an exact color to treat as transparent on the image - 0 for none, FF000000 for black, FFFF0000 for full red, and so on) an area of the base image, a border area (used to build resizable buttons without distortion, for example), an alpha component and a color component (the last two of which are not currently implemented, but will be).

The base image (required) and color key (optional) must be given in the element's begin tag, like so:

<Texture Filename="CheckBox.png" ColorKey="FF000000">

It is also important to note that if none of Left, Top, Right, or Bottom are given, the entire base image will be used

XML Properties

Tag Description Default
Left Leftmost coordinate, relative to the base image none
Top Topmost coordinate, relative to the base image none
Right Rightmost coordinate, relative to the base image none
Bottom Bottom coordinate, relative to the base image none
Border Number of pixels around the edge to be used as "border" in certain controls 0
Alpha Overall transparency value (0-255) not yet implemented none
ColorMask This color will be blended with the texture none
Orientation The image will be rotated clockwise by 90 times this many degrees (0-3). e.g. 3 is a rotation of 270 degrees 0



Built-in UI Element Types

Sample Interface Files

Creating Element Types

See Also