Difference between revisions of "ISUI"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 8: Line 8:
 
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.
 
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 <tt>begin tag</tt> for the element must include a Name, like so:
 +
<Button Name="My Button">
 
==== XML Attributes ====
 
==== XML Attributes ====
 
{| border="1" cellpadding="2"
 
{| border="1" cellpadding="2"
Line 29: Line 31:
 
| 1 if the element should be visible, 0 if not || 1
 
| 1 if the element should be visible, 0 if not || 1
 
|-
 
|-
 +
|}
 +
<br>
 +
----
 +
 +
=== 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 Attributes ====
 +
{| border="1" cellpadding="2"
 +
!width="15%"|Tag
 +
!width="75%"|Description
 +
!width="10%"|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 '''not yet implemented''' || ''none''
 
|}
 
|}
 
<br>
 
<br>
Line 35: Line 77:
 
=== Built-in UI Element Types ===
 
=== Built-in UI Element Types ===
 
* [[ISUI:button (Element Type)|button]]
 
* [[ISUI:button (Element Type)|button]]
 +
* [[ISUI:checkbox (Element Type)|checkbox]]
 
* [[ISUI:commandbutton (Element Type)|commandbutton]]
 
* [[ISUI:commandbutton (Element Type)|commandbutton]]
 +
* [[ISUI:commandcheckbox (Element Type)|commandcheckbox]]
 
* [[ISUI:commandentry (Element Type)|commandentry]]
 
* [[ISUI:commandentry (Element Type)|commandentry]]
 
* [[ISUI:console (Element Type)|console]]
 
* [[ISUI:console (Element Type)|console]]

Revision as of 18:04, 30 May 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 Attributes

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 Attributes

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 not yet implemented none



Built-in UI Element Types

Sample Interface Files

Creating Element Types

See Also