UIS
User Interface Script (UIS) is an SGML-like format which sets up UI controls in TSO's game menus.
UIS file contents are enclosed with <Begin><End>
. Any text which does not appear inside the brackets of a tag is ignored, with the exception that the pound character (#) can be used at the beginning of a line to comment out tags. Tags are not closed like they are in XML/SGML.
All regular tags have a nameless attribute. That is, that attribute is not prepended with attribute=
. Attributes are case-insensitive both before and after the =.
On this page, attributes are arranged not alphabetically, but in the order in which the game refers to them.
UIS files use a top-down coordinate system. The x,y position of any control defines the offset from the top-left of the picture to the top-left of the control.
Contents
Regular tags[edit]
AddButton[edit]
This tag defines the creation of a button control.
Attribute | Required? | Description |
---|---|---|
Nameless | Yes | Defines the UIS identifier of this button control |
id | Yes | Defines the identifier of this button control |
position | Yes | Defines the position of this button control in x,y coordinates. Syntax: (x,y) |
size | No | Defines the dimensions of this button control. Syntax: (width,height) |
textHighlighted | No | Defines whether or not this button control uses highlighted text. 1=Yes, 0=No. Default is no. |
font | No | Defines the font size of this button control in points. |
textColor | No | Defines the regular text color of this button control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
textColorSelected | No | Defines the selected text color of this button control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
textColorHighlighted | No | Defines the highlighted text color of this button control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
textColorDisabled | No | Defines the disabled text color of this button control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
textButton | No | Defines whether or not this button renders as a "textButton", meaning horizontally segmented into 3 and scaled to fit the explicitly defined size or width of the inner text. If this is set, buttons with no image will automatically assume the default button image, otherwise they will have no button image. 1 for true, 0 for false. Defaults to 1 if text is defined. |
text | No | Defines a UIS string resource to use as text |
image | No | Defines a UIS image resource to associate with this button control |
ImageStates | No | Defines the number of image states associated with this button control |
trigger | No | Defines whether or not this button will trigger. 1=Yes, 0=No. Default is no trigger. |
tracking | No | Defines the type of tracking this button will employ. Valid options are 0, 1, or 2. Default is 0. |
AddFormatedText[edit]
Yes, this is a typo in the game itself.
Attribute | Required? | Description |
---|---|---|
Nameless | Yes | Defines the UIS identifier of this formatted text control |
id | Yes | Defines the identifier of this formatted text control |
position | Yes | Defines the position of this formatted text control in x,y coordinates. Syntax: (x,y) |
size | Yes | Defines the dimensions of this formatted text control. Syntax: (width,height) |
opaque | Yes | Defines the opacity of this formatted text control. 1 means opaque, 0 means transparent. |
lineHeight | Yes | Defines the line height of each row of this formatted text control in points |
edgeOffsetL | No | Defines the left edge offset of the text |
edgeOffsetR | No | Defines the right edge offset of the text |
edgeOffsetT | No | Defines the top edge offset of the text |
edgeOffsetB | No | Defines the bottom edge offset of the text |
AddListBox[edit]
This tag defines the creation of a list box control.
Attribute | Required? | Description |
---|---|---|
Nameless | Yes | Defines the UIS identifier of this list box control |
id | Yes | Defines the identifier of this list box control |
position | Yes | Defines the position of this text control in x,y coordinates. Syntax: (x,y) |
size | Yes | Defines the dimensions of this text control. Syntax: (width,height) |
visibleRows | Yes | Defines the height of the list box in rows |
columns | Yes | Defines the number of columns used in this list box |
alignments | Yes | Defines the alignment of this list box control |
font | No | Defines the font size of this list box control in points. |
rowHeight | No | Defines the line height of each row of this list box control in points |
transparent | Yes | Defines the transparency of this list box control. 1 is transparent and 0 is opaque. |
fillColor | No | Defines the fill color of this list box control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
selectionFillColor | No | Defines the selection fill color of this list box control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
cursor | No | Defines whether or not this list box control will show a cursor. 1=Yes, 0=No. Default is yes. |
AddProgressBar[edit]
This tag defines the creation of a progress bar control.
Attribute | Required? | Description |
---|---|---|
Nameless | Yes | Defines the UIS identifier of this progress bar control |
id | Yes | Defines the identifier of this progress bar control |
position | Yes | Defines the position of this text control in x,y coordinates. Syntax: (x,y) |
foregroundImage | No | Defines a UIS image resource to associate as the foreground image for this button control |
backgroundImage | No | Defines a UIS image resource to associate as the background image for this button control |
minValue | No | Defines the value associated with the start end of this progress bar control |
maxValue | No | Defines the value associated with the finish end of this progress bar control |
value | No | Defines the initial value which this progress bar control is set to |
AddSlider[edit]
Attribute | Required? | Description |
---|---|---|
Nameless | Yes | Defines the UIS identifier of this slider control |
id | Yes | Defines the identifier of this slider control |
image | Yes | Defines a UIS image resource to associate with this slider control |
position | Yes | Defines the position of this slider control in x,y coordinates. Syntax: (x,y) |
minValue | No | Defines the value associated with the small end of this slider control |
maxValue | No | Defines the value associated with the big end of this slider control |
size | Yes | Defines the dimensions of this slider control. Syntax: (width,height) |
orientation | Yes | Defines the orientation of this slider control. 0 means horizontal and 1 means vertical. |
AddText[edit]
This tag defines the creation of a text control.
Attribute | Required? | Description |
---|---|---|
Nameless | Yes | Defines the UIS identifier of this text control |
id | Yes | Defines the identifier of this text control |
position | Yes | Defines the position of this text control in x,y coordinates. Syntax: (x,y) |
size | Yes | Defines the dimensions of this text control. Syntax: (width,height) |
text | No | Defines a UIS string resource to use as text |
font | Yes | Defines the font size of this text control in points. |
highlighted | No | Defines whether or not the text in this text control is initially highlted. 1=Yes, 0=No. Default is no. |
color | Yes | Defines the font color of this text control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
alignment | Yes | Defines the alignment of this text control. 0=Left-Top, 1=Left-Center, 2=Center-Top, 3=Center-Center, 4=Right-Top, 5=Right-Center |
opaque | Yes | Defines the opacity of this text control. 1 is opaque and 0 is transparent. |
wrapped | No | Defines whether or not text wraps on to new lines. 1=Yes, 0=No. Default is no. |
fitText | No | Defines whether or not this text should be fit into its bounding box. 1=Yes, 0=No. Default is no. |
AddTextEdit[edit]
Attribute | Required? | Description |
---|---|---|
Nameless | Yes | Defines the UIS identifier of this text edit control |
id | Yes | Defines the identifier of this text edit control |
position | Yes | Defines the position of this text edit control in x,y coordinates. Syntax: (x,y) |
size | Yes | Defines the dimensions of this text edit control. Syntax: (width,height) |
font | Yes | Defines the font size of this text edit control in points. |
lines | No | Defines the number of lines in this text edit control |
capacity | No | Defines the maximum character limit of this text control. Default is 0 for unlimited. |
frameOnFocus | No | Defines whether this text edit control will receive a border on focus. 1=Yes, 0=No. Default is yes. |
color | Yes | Defines the font color of this text edit control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
transparent | Yes | Defines the transparency of this text edit control. 1 is transparent and 0 is opaque. |
alignment | No | Defines the alignment of this text control. 0=Left-Top, 1=Left-Center, 2=Center-Top, 3=Center-Center, 4=Right-Top, 5=Right-Center. Default is left-top. |
flashOnEmpty | No | Defines whether or not this text edit control will flash when it is empty. 1=Yes, 0=No. Default is no flashing. |
notifyOnEnter | No | Defines whether or not this text edit control will be notified when the user presses the enter key. 1=Yes, 0=No. Default is no notification. |
mode | No | Defines extra attributes for this text edit control. Valid values are kInsert, kOverwrite, and kReadOnly (according to TSOWinAppD_base+0x1876ed). |
scrollbarImage | No | Defines a UIS image resource to associate with the scrollbar of this text edit control |
scrollbarGutter | No | Defines the width of the scrollbar in pixels. This should match the width of scrollbarImage. |
scrollbarType | No | Defines the type of the scrollbar of this text edit control. 0=slider, 1=scrollbar. Default is scrollbar. |
ResizeForExactLineHeights | No | Defines whether this text edit control should resize for exact line heights. 1=Yes, 0=No. Default is no. |
enableIME | No | Defines whether or not to enable input method editing. 1=Yes, 0=No. Default is no IME. |
DefineImage[edit]
This tag defines a UIS image resource.
Attribute | Required? | Description |
---|---|---|
Nameless | Yes | Defines the UIS identifier of this UIS image resource |
assetID | Yes | Defines the Asset ID of the image to associate with this resource |
DefineString[edit]
This tag defines a UIS string resource.
Attribute | Required? | Description |
---|---|---|
Nameless | Yes | Defines the UIS identifier of this UIS string resource |
stringDir | Yes | Defines the directory to locate the relevant string table |
stringTable | Yes | Defines the identifier of the string table to locate the desired string |
stringIndex | Yes | Defines the identifier of the desired text string to read from the given string table |
Special tags[edit]
SetControlProperties[edit]
SetControlProperties can be used to assign attributes to a control hardcoded into the game, for instance, the "background" control. Its usage is as follows:
<SetControlProperties "ControlIdentifier" foo="bar" baz="(12,34)">
[edit]
SetSharedProperties can be used to automatically assign attributes to tags within an embedded <Begin><End> pair. Its usage is as follows:
<Begin><SetSharedProperties attribute1="foo" attribute2="bar"> <ExampleTag "Control1" id=100> <ExampleTag "Control2" id=101> <End>
SetSharedProperties can also be used in the topmost <Begin><End> pair, thereby affecting all statements through to the end of the file.
Standard attributes[edit]
Standard attributes are optional attributes which can be used for any control.
Attribute | Description |
---|---|
backColor | Defines the background color of this control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
cursorColor | Defines the cursor color of this control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
frameColor | Defines the border color of this control. Syntax: (Red, Green, Blue) where each of these colors is a number in the range of [0-255]. |
useBackgroundImage | Defines whether or not this control will use a background image. 1=Yes, 0=No. Default is no. |
enabled | Defines whether or not this control is initially enabled. 1=Yes, 0=No. Default is yes. |
tooltip | Defines tooltip text for this control |
|