Difference between revisions of "ISUI"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 34: Line 34:
 
<br>
 
<br>
 
----
 
----
 +
=== Colors in ISUI ===
 +
Colors in all areas of the ISUI are given in 32-bit hexadecimal values (8 hexadecimal digits).  The first two are the Alpha component of the color, followed by Red, Green, and Blue in that order (AARRGGBB), where each hexadcimal digit is one of 0123456789ABCDEF.  The alpha value is considered "transparency", with FF being opaque and 00 being transparent.  Generally, your colors will use FF for alpha.  This means that Red is FFFF0000, Green is FF00FF00, and Blue is FF0000FF.
  
 
=== UI Texture Definition ===
 
=== UI Texture Definition ===

Revision as of 20:06, 10 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



Colors in ISUI

Colors in all areas of the ISUI are given in 32-bit hexadecimal values (8 hexadecimal digits). The first two are the Alpha component of the color, followed by Red, Green, and Blue in that order (AARRGGBB), where each hexadcimal digit is one of 0123456789ABCDEF. The alpha value is considered "transparency", with FF being opaque and 00 being transparent. Generally, your colors will use FF for alpha. This means that Red is FFFF0000, Green is FF00FF00, and Blue is FF0000FF.

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