<!doctype linuxdoc system [
<!ENTITY q3ta 'Quake III: Team Arena'>
<!ENTITY wfa 'Weapons Factory Arena'>
<!ENTITY int '&lsqb;int&rsqb;'>
<!ENTITY float '&lsqb;float&rsqb;'>
<!ENTITY color '&lsqb;color&rsqb;'>
<!ENTITY rect '&lsqb;rect&rsqb;'>
<!ENTITY string '&lsqb;string&rsqb;'>
<!ENTITY script '&lsqb;script&rsqb;'>
]>

<article>

<title>Quake III: Team Arena Menu Files</title>
<author>PhaethonH (phaethon at linux ucla edu)
<date>2006 Nov 25
<abstract>
Description of the
&q3ta;
menu scripting language in its role as general menuing and as HUD.
</abstract>


<toc>


<sect>Introduction
<label id="intro">

<sect1>Copyright
<label id="intro-copyright">
<p>
Copyright (c)  2003  PhaethonH
<p>
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections,
with no Front-Cover Texts,
and with no Back-Cover Texts.
A copy of the license is included in the section entitled
"GNU Free Documentation License".

<p>
The original author is known as PhaethonH (phaethon@linux.ucla.edu).
Sections or paragraphs may be copyrighted by different authors.
This document is released under the Free Documentation License (FDL) to protect the public's right to copying.

<sect1>Disclaimer
<label id="intro-disclaimer">
<p>
This document is provided in the hopes of being useful.
There is no guarantee to the accuracy of the information contained within, although best-effort attempts are made at accuracy and completion.
Use this information at your own risk.
Although this information is unlikely to destroy a monitor, blow fuses, or cause the universe to cave in on itself, anything can go wrong (see Finagle's Law and Murphy's Law).
Furthermore, I (PhaethonH) don't get paid writing this in the first place.

<sect1>Acknowledgements and Credits
<label id="intro-credits">
<p>
<descrip>
<tag><label id="credits-vaejor">
Vaejor (Vaejor the-litte-at-sign-thingy mail com)</tag>
itemDef::special, noted that itemDef::decoration doesn't take a parameter, some test results of itemDef::style, itemDef::textScale.

<tag><label id="credits-belac">
BeLaC</tag>
Caught typos in the values for cgame ownerdraw.

<tag><label id="credits-sweetnutz">
SweetnutZ (mercjohns@hotmail.com), designer for
<htmlurl url="http://www.urbanterror.net/" name="Quake III Urban Terror">
(Q3UT)</tag>
Having worked on the UI of Q3UT for Q3 1.27,
provided plenty of updates and verifications, with special thanks on
 menuDef::focuscolor,
 menuDef::disablecolor,
 menuDef::outOfBoundsClick,
 itemDef::asset_shader,
 itemDef::decoration,
 itemDef::wrapped,
 itemDef::type,
 itemDef::elementwidth,
 itemDef::elementheight,
 itemDef::elementtype,
 itemDef::outlineColor,
 ITEM_TYPE_MODEL,
 UI_*TEAM_LEADER/MEMBER*,
 and UI_OPPONENTMODEL

<tag><label id="credits-madad">
Mad Ad (m::::::@n::.n::.c::)</tag>
Indirectly alerted me to lack of info on actually loading a custom HUD.

<tag><label id="credits-dementor">
dementor (dementor(at)comcast.net), coder for
Terror Quake 3 (TQ3)</tag>

Introduced me to uiScript, and provided much of the initial material:
stopRefresh, LoadDemos, LoadMods, playMovie, verifyCDKey, StartServer,updateSPMenu, resetDefaults, getCDKey, loadArenas, loadGameInfo, resetScores,
RefreshServers, RefreshFilter, RunSPDemo, LoadMovies, RunMod, Quake3, closeJoin, ServerStatus, FoundServerStatus, FindPlayer, JoinServer, FoundPlayerJoinServer,
Quit, Controls, ServerSort, nextSkirmish, glCustom

<tag><label id="credits-thnom">
thnom (irc://irc.enterthegame.com/thnom)</tag>
Info on itemDef::model_rotation, UI_MAPCINEMATIC, UI_PREVIEWCINEMATIC; verified CG_1STPLACE and CG_2NDPLACE.

<tag><label id="credits-rfactory">
dairyman (rfactory.org)</tag>
Many updates and additions: fonts info, colors, popup info, text alignments, many ui elements, ownerdraws, identification of disabled/unused commands.

</descrip>
<sect1>Background
<label id="intro-background">
<p>
With the release of &q3ta; (Quake3 point release 1.27), Id Software introduced a new method of creating menus.
Instead of creating the menus in the C code of a QVM, menus can be described in menu description files, in a sort of menu-scripting language.
These are plaintext files that are more flexible and customizable than C-based menus.

<p>
For further customizations, these files can be read off the user's filesystem, outside of pak (pk3) files.
As a result, a customized menu can be used regardless of whether the server is in pure mode or not.
(XXX: Describe pure mode.)
The restriction, though, is that the filename <it>must</iT> end with ``.menu'' or ``.cfg''.
Only then may Q3A (and mods based on it) be able to read from the filesystem instead of only from a pak (pk3) file.

<p>
The Quake 3 game is broken into three ``modules'': cgame, game, ui.
<descrip>
<tag>cgame</tag>
``Client Game'', this modules render the graphics, plays sounds, handles player control, and does other stuff to make the game interactive.
Some code is duplicated between cgame and game for purposes of prediction (compensate for net lag).

<tag>game</tag>
On the server side, this module lays out and tracks the actual gameplay.
A dedicated server requires only this module.
Inactive on client side, with the exception of single-player mode.

<tag>ui</tag>
``User Interface'', this module presents the main menu (on startup), and the in-game ESC menu.
This module is always active on client-side, but suspends (sleeps) during gameplay, until reactivated (woken up, e.g. pressing ESC key).

</descrip>

<p>
The HUD is now a special case of the menu code.
The menu code, however, is in the domain of the ``ui'' module.
As a result, much code criss-crosses between ``cgame'' and ``ui'' so that ``cgame'' may parse and handle menus (i.e. HUD elements).


<sect1>Purpose
<label id="intro-purpose">
<p>
This document attempts to document the new menu scripting system of &q3ta;.
There is no other known publicly-available documentation on the new menu system.
The original author is also not aware of any privately-available documentation.
As such, this document is a continual work-in-progress, as new information is discovered and added.
Many pieces of this document are left empty or partially described.
They may be filled in at a later date (no guarantees).

<p>
The information collected on the menu system was collected while modifying the HUD for &wfa; pre-3.0 betas.
Therefore, there is a particular bias of concentration towards HUD development for that mod.

<p>
This document is more of a reference document, not a guide or a HOWTO, so expect much dry reading.

<sect1>Feedback
<label id="intro-feedback">
<p>
If you find any mistrakes or discover new tidbits of information, you can e-mail
the relevant information to
<htmlurl url="mailto:phaethon@linux.ucla.edu" name="phaethon@linux.ucla.edu">
Depending on schoolwork load, time of day, mood, mailbox size, and phase of the moon, I may or may not respond and/or include submissions.
As a last resort, the copyright allows anyone else to take over the document management in the event of excessive negligence.

<sect1>Latest Version
<label id="intro-latest-version">
<p>
The canonical URL for this document is
<url url="http://www.linux.ucla.edu/~phaethon/q3tamenu/q3tamenu.html">.
This might change in the future, but seems unlikely.
Updates (to the document, and to the location) will be provided at the indicated URL.
The latest version of this document is determined by the document's date.

<sect1>ChangeLog
<label id="intro-changelog">
<p>
<descrip>
<tag>2001.03.30</tag>
Initial release.

<tag>2001.04.21</tag>
Additions to itemDef:addColorRange.

<tag>2001.04.22</tag>
Touched up itemDef:textscale, *:border, menuDef:style, *:background.  Added links for values for ownerdraw, style, textstyle, etc.

<tag>2001.04.23</tag>
Contributions by Vaejor: itemDef:special, itemDef:decoration, itemDef:style, itemDef:textscale.

<tag>2001.04.23</tag>
Additions to itemDef:cvar, itemDef::cvarFloat, itemDef::cvarStrList, itemDef::align, ITEM_TYPE_SLIDER.

<tag>2001.04.23</tag>
Redid cgame and ui ownerdrawFlag descriptions in a more patterned manner.  Fixed error where half the values for cgame ownerdraw didn't match up with menudef.h (eek!).

<tag>2001.04.25</tag>
Some typos fixed.  Apparently all the values for ownerdrawflag were wrong, so the numbers are removed for now.

<tag>2001.05.19</tag>
Change of wordings.  No new info added.

<tag>2001.06.09</tag>
Additions and verifications by SweetnutZ of Silicon Ice Development (Quake III realism modification Urban Terror).

<tag>2001.06.14</tag>
Added extensive, but by no means complete, cross-references.
Preparing migration from LinxuDoc SGML DTD to DocBook SGML DTD by using m4 macro preprocessor.

<tag>2002.02.21</tag>
Added information on how to actually load a custom HUD.

<tag>2002.02.22</tag>
Added menuloader as another component of the menuing system.
Added sections on the menuloader files.

<tag>2002.03.03</tag>
Added uiScript section.
Thanks to <ref id="credits-dementor" name="dementor">.

<tag>2003.01.18</tag>
Added model_rotation information.
Thanks to <ref id="credits-thnom" name="thnom">

<tag>2003.01.22</tag>
Added info on UI_MAPCINEMATIC and UI_PREVIEWCINEMATIC.
Thanks to <ref id="credits-thnom" name="thnom">

<tag>2003.01.26</tag>
Expansions on cinematics-related entries.
Rewordings in Background section.

<tag>2006.11.25</tag>
Numerous updates and edits from <htmlurl url="http://rfactory.org/" name="The Reaction Factory"> 2006.03.17 edition, particularly on UI elements.
Started split of descriptions targeted for designers (things that do work) and for developers/programmers (things that <it>should</iT> work/are broken).

</descrip>
<sect>The Q3TA Menu
<label id="q3tamenu">
<sect1>Documentation syntax
<label id="syntax">
<p>
Items in plain font is a keyword.
<p>
Items within square brackets ([]) are required.
<p>
Items within angle brackets (&lt;&gt;) are optional.
<p>
A ``string'' type can be optionally enclosed in double-quotes (").
This use of double-quotes is required if the string contains a space.
Highly recommended to always use double-quotes for strings, if for no other reason than style consistency.
<p>
A ``int'' type is an integer number, negative or not, with no fractional (decimal) portion.
<p>
A ``float'' type is a floating point number, negative or not, with or without a fractional (decimal) portion.
<p>
A ``color'' type is four sequential floats, indicating a RGBA value.
Each float corresponds to:
<enum>
<item>Red component
<item>Green component
<item>Blue component
<item>Alpha component
</enum>
<p>
Each component is given a value from zero (none) to one (full).
Zero alpha is full transparency (invisible), with one being full opacity.
Partial values are fractional numbers between 0 and 1 (e.g. "0.58").
<p>
A ``rect'' type is four sequential ints.
The four numbers correspond to:
<enum>
<item>Horizontal (X) position of the rectangle's upper-left corner
<item>Vertical (Y) position of the rectangle's upper-left corner
<item>Width of the rectangle
<item>Height of the rectangle
</enum>
<p>
The coordinates are scaled to a 640x480 screen: horizontal values range from 0 to 640, vertical values range from 0 to 480.
So even if the screen resolution is 1600x1200, "(320, 240)" (half of 640, half of 480) still means the center of the screen.
"0 0 640 480" is full-screen.
<p>
The special marker XXX indicates meta-notes/hints about incompleteness in some form.

<sect1>Menu Layout
<label id="menu-layout">
<p>
The description of menus can lay across many files.
In fact, the &q3ta; main menu is described across more than 30 files.
There are three main components to the menu system:
<enum>
<item>menuloader
<item>menu definition (menuDef)
<item>item definition (itemDef)
</enum>

<p>
Items are the individual parts of a menu that actually carry out actions.
Menus are logical (and physical) groupings of items.
Submenus are possible, but not directly (i.e. no defining a menu inside a menu);
instead, an item may open another menu, then re-open the previous menu upon closing, creating a submenu effect.
Menuloader lists menus to prepare for display, and, in a sense, groups menus.

<sect1>Menu Format
<label id="menu-format">
<p>
The format is loosely based on the programming language C.
`menuDef' and `itemDef' describe groupings that can be compared to C function or structs.
These two define their bodies within curly braces ({}).
Both `menuDef' and `itemDef' are composed of ``statements'' that end with a semicolon.
An `itemDef' can only be nested inside a `menuDef'.
This means no nesting an `itemDef' inside another `itemDef'.
`menuDef' cannot be nested inside anything else.


<sect>Menuloader
<label id="menu-loader">
<p>
&quot;Menuloader&quot; is a fabricated word to describe the file.
Relevant variables in the game source use the name &quot;menuFile&quot;, but I feel that name would be confusing with &quot;menuDef&quot;.
So far, only one keyword is recognized: ``loadmenu''.

<p>
A menuloader groups menus into functionally related groups.
Q3TA has three such main groups:
<itemize>

<item>ui/hud.txt - cgame module
<item>ui/ingame.txt - ui module
<item>ui/menus.txt - ui module
</itemize>

<p>
Frequently, the menuloader file has the extension &quot;.txt&quot;.
In the case of user-customized menus, the user would need to use the extension &quot;.cfg&quot; instead (&quot;.menu&quot; is also valid, but not recommended for sake of clarity).
The content is often:
<tscreen><verb>
{
    loadmenu { "somefile.menu" }
    loadmenu { "someotherfile.menu" }
    loadmenu { "morefile.menu" }
    ...
}
</verb></tscreen>
Where each string indicates a .menu file to load and prepare.



<sect>menuDef { ... }
<label id="menudef">
<p>
A menuDef is a grouping of itemDefs.
The following describe keywords that are recognized in a menuDef body, but outside of any itemDef bodies.

<sect1>font &string;
<label id="menu-font">
<p>
The given string is interpreted as a font name.
The default is ``default''.
<!-- &q3ta; is now able to use True-Type Font (TTF), so a TTF font name can be provided here, as long as the corresponding TTF is available to &q3ta; (usually in a pk3 pak file). -->
<!-- rfactory --> This command should not be used as it only defines one of the three required font sizes that Team Aren uses.

<sect1>name &string;
<label id="menu-name">
<p>
Sets a name for the menu.
This keyword is primarily useful when opening the menu as a submenu, where an item in another menu can open this menu by name.
<p>
See also:
<ref id="item-name" name="`itemDef::name'">,
<ref id="item-group" name="`itemDef::group'">,
<ref id="script-open" name="`script::open'">,
<ref id="script" name="`Script actions'">.

<sect1>rect &rect;
<label id="menu-rect">
<p>
Define a rectangle on the screen for the menu to occupy.
Menu rectangles may overlap; the last rect defined sits on top.
Nested items are offset from this rect's left and top edges (meaning this rect acts as a new "mini-screen" for coordinates for the items inside).
<p>
See also:
<ref id="menu-fullscreen" name="`menuDef::fullscreen'">,
<ref id="item-rect" name="`itemDef::rect'">,
<ref id="script-transition" name="`script::transition'">.

<sect1>fullscreen &int;
<label id="menu-fullscreen">
<p>
<!-- A shortcut method to set `rect' to fill up the entire screen, which is just ``rect 0 0 640 480''. -->
<!-- rfactory --> A method of setting up a rectangle on the screen for the menu to occupy that covers the entire screen and to tell the program that nothing else is being rendered underneath this menu. This command must be used in place of the 'rect' command for the bottom menu.
<p>
See also:
<ref id="menu-rect" name="`menuDef::rect'">,
<ref id="script-transition" name="`script::transition'">.

<sect1>style &int;
<label id="menu-style">
<p>
Defines a window style for the menu.
<p>
See also:
<ref id="values-style" name="Values for ``style''">,
<ref id="item-style" name="`itemDef::style'">,
<ref id="values-style" name="Values for ``style''">.

<sect1>visible &int;
<label id="menu-visible">
<p>
Sets visibility of this menu, whether it gets drawn or not.
The visibility of a menu can be changed by an item, in conjunction with the menu name.
<p>
See also:
<ref id="item-visible" name="`itemDef::visible'">,
<ref id="script-show" name="`script::show'">,
<ref id="script-hide" name="`script::hide'">.

<sect1>onOpen { &script; }
<label id="menu-onopen">
<p>
Runs the provided script when the menu opens.
When &q3ta; start up, the main menu runs this script (because it just opened).
This action also occurs when the menu is opened as a submenu.
<p>
See also:
<ref id="menu-onclose" name="`menuDef::onClose'">,
<ref id="item-leavefocus" name="`itemDef::leaveFocus'">,
<ref id="script-open" name="`script::open'">,
<ref id="script" name="`Script actions'">.

<sect1>onClose { &script; }
<label id="menu-onclose">
<p>
Runs the provided script when the menu closes.
This action can be used for a limited amount of cleanup work and to mimick submenuing effects.
<p>
See also:
<ref id="menu-onopen" name="`menuDef::onOpen'">,
<ref id="menu-outofboundsclick" name="`menuDef::outOfBoundsClick'">,
<ref id="script-close" name="`script::close'">,
<ref id="script" name="`Script actions'">.

<sect1>onESC { &script; }
<label id="menu-onesc">
<p>
Runs the provided script when the Escape key (ESC) is pressed.
This action usually closes the menu (by opening another).
<!-- XXX: more fluff -->
<p>
See also:
<ref id="menu-outofboundsclick" name="`menuDef::outOfBoundsClick'">,
<ref id="script-open" name="`script::open'">,
<ref id="script" name="`Script actions'">.

<sect1>border &int;
<label id="menu-border">
<p>
Sets a border type.
<p>
See also:
<ref id="values-border" name="Values for ``border''">,
<ref id="menu-bordersize" name="`menuDef::bordersize'">,
<ref id="menu-bordercolor" name="`menuDef::bordercolor'">,
<ref id="item-border" name="`itemDef::border'">.

<sect1>borderSize &float;
<label id="menu-bordersize">
<p>
Sets the border thickness.
The border is drawn inside of the menu rect.
The origin coordinates for nested items is shifted,
meaning that "0, 0" for itemDefs changes accordingly to avoid the border.
<p>
See also:
<ref id="menu-border" name="`menuDef::border'">,
<ref id="menu-bordercolor" name="`menuDef::bordercolor'">,
<ref id="item-bordersize" name="`itemDef::bordersize'">.

<sect1>backcolor &color;
<label id="menu-backcolor">
<p>
Sets the menu background color.
Only meaningful if the rect `style' is set to WINDOW_STYLE_FILLED.
<!-- XXX: verify. -->
<p>
See also:
<ref id="menu-style" name="`menuDef::style'">,
<ref id="menu-background" name="`menuDef::background'">,
<ref id="menu-bordercolor" name="`menuDef::bordercolor'">,
<ref id="menu-focuscolor" name="`menuDef::focuscolor'">,
<ref id="menu-disablecolor" name="`menuDef::disablecolor'">,
<ref id="item-backcolor" name="`itemDef::backcolor'">.

<sect1>forecolor &color;
<label id="menu-forecolor">
<p>
Sets menu foreground color.
<!-- Usage unclear, but the most obvious use is in displaying images that consist only of alpha values, such as a crosshair. -->
<!-- (Editor's note: that usage wasn't very obvious in the first place, which makes its other uses that much more obscure) -->
<!-- rfactory --> Used as tint color for background shaders.
<p>
See also:
<ref id="menu-style" name="`menuDef::style'">,
<ref id="menu-backcolor" name="`menuDef::backcolor'">,
<ref id="menu-bordercolor" name="`menuDef::bordercolor'">,
<ref id="menu-focuscolor" name="`menuDef::focuscolor'">,
<ref id="menu-disablecolor" name="`menuDef::disablecolor'">,
<ref id="item-forecolor" name="`itemDef::forecolor'">,
<ref id="script-setitemcolor" name="`script::setitemcolor'">.

<sect1>bordercolor &color;
<label id="menu-bordercolor">
<p>
Sets the border color.
<p>
See also:
<ref id="menu-border" name="`menuDef::border'">,
<ref id="menu-bordersize" name="`menuDef::bordersize'">,
<ref id="item-bordercolor" name="`itemDef::bordercolor'">.

<sect1>focuscolor &color;
<label id="menu-focuscolor">
<p>
Sets the text color of items when they are focused -- that is, when the item is enabled and has the mouse cursor over it.
See also <ref id="menu-disablecolor" name="disablecolor">.
<p>
See also:
<ref id="menu-disablecolor" name="`menuDef::disablecolor'">,
<ref id="menu-backcolor" name="`menuDef::backcolor'">,
<ref id="item-onfocus" name="`itemDef::onFocus'">,
<ref id="script-setfocus" name="`script::setfocus'">.

<sect1>disablecolor &color;
<label id="menu-disablecolor">
<p>
Sets the text color of items when they are disabled.
See also
<ref id="menu-focuscolor" name="focuscolor">,
<ref id="item-cvartest" name="cvartest">,
<ref id="item-disablecvar" name="disableCvar">.

<sect1>background &string;
<label id="menu-background">
<p>
The provided string is interpreted as a Q3A shader or an image (JPG or TGA) to display in the rect background.
Images are stretched to fit the rect, ignoring aspect ratios.
Shaders can have their own instructions on how to fill the rect.
<p>
See also:
<ref id="menu-style" name="`menuDef::style'">,
<ref id="item-background" name="`itemDef::background'">.

<sect1>ownerdraw &int;
<label id="menu-ownerdraw">
<p>
Causes the Q3A engine to draw something within the confines of the menu rect.
Primary use is in HUDs (such as showing health).
<p>
See also:
<ref id="values-cg-ownerdraw" name="Values for cgame ``ownerdraw''">,
<ref id="values-ui-ownerdraw" name="Values for ui ``ownerdraw''">,
<ref id="menu-style" name="`menuDef::style'">,
<ref id="menu-ownerdrawflag" name="`menuDef::ownerdrawflag'">,
<ref id="item-ownerdraw" name="`itemDef::ownerdraw'">.

<sect1>ownerdrawflag &int;
<label id="menu-ownerdrawflag">
<p>
The menu asks the Q3A engine for a certain value; this value determines whether the menu (along with its items) gets drawn or not.
If the menu was already invisible, nothing is drawn regardless of this flag value.
<p>
See also:
<ref id="values-cg-ownerdrawflag" name="Values for cgame ``ownerdrawflag''">.
<ref id="values-ui-ownerdrawflag" name="Values for ui ``ownerdrawflag''">.
<ref id="menu-ownerdraw" name="`menuDef::ownerdraw'">,
<ref id="item-ownerdrawflag" name="`menuDef::ownerdrawflag'">.

<sect1>outOfBoundsClick
<label id="menu-outofboundsclick">
<p>
According to <ref id="credits-belac" name="SweetnutZ">,
with this tag/flag in the menuDef,
clicking outside the menu rectangle area causes the menu to close.
<!-- XXX: verify -->
<p>
See also:
<ref id="menu-onclose" name="`menuDef::onClose'">,
<ref id="menu-onesc" name="`menuDef::onEsc'">.

<sect1>soundLoop &string;
<label id="menu-soundloop">
<p>
The given string is interpreted as a sound name (filename for the most part) to play in a loop.
The loop is stopped by providing an empty string (soundLoop "").
<p>
See also:
<ref id="script-play" name="`script::play'">,
<ref id="script-playlooped" name="`script::playerlooped'">.

<sect1>cinematic &string;
<label id="menu-cinematic">
<p>
Plays a cinematic (RoQ file) within the menu rect.
The RoQ path name is provided in the string; the path name is as stored in the pk3 file.
RoQs can be created from AVIs by tools provided by Id Software.
AVIs can be created from multiple TGAs (or most any other image files) by various free/freeware/shareware/not-so-free tools.
<p>
See also:
<ref id="menu-style" name="`menuDef::style'">,
<ref id="item-cinematic" name="`itemDef::cinematic'">.

<sect1>popup
<label id="menu-popup">
<p>
<!-- no idea. -->
<!-- rfactory --> Causes the menu to be drawn overtop of the calling menu. Only items in this menu can gain the focus, even though items in the underlying menu can be seen.

<sect1>fadeClamp &float;
<label id="menu-fadeclamp">
<p>
Along with
<ref id="menu-fadeamount" name="fadeAmount">
and
<ref id="menu-fadecycle" name="fadeCycle">,
implements a fade-in effect.
Best advice so far: fiddle with it.
<p>
See also:
<ref id="menu-fadeamount" name="`menuDef::fadeAmount'">,
<ref id="menu-fadeclamp" name="`menuDef::fadeClamp'">,
<ref id="script-fadein" name="`script::fadein'">,
<ref id="script-fadeout" name="`script::fadeout'">.

<sect1>fadeAmount &float;
<label id="menu-fadeamount">
<p>
Along with
<ref id="menu-fadeclamp" name="fadeClamp">
and
<ref id="menu-fadecycle" name="fadeCycle">,
implements a fade-in effect.
Best advice so far: fiddle with it.
<p>
See also:
<ref id="menu-fadecycle" name="menuDef::fadeCycle">,
<ref id="menu-fadeclamp" name="menuDef::fadeClamp">,
<ref id="script-fadein" name="`script::fadein'">,
<ref id="script-fadeout" name="`script::fadeout'">.

<sect1>fadeCycle &float;
<label id="menu-fadecycle">
<p>
Along with
<ref id="menu-fadeclamp" name="fadeClamp">
and
<ref id="menu-fadeamount" name="fadeAmount">,
implements a fade-in effect.
Best advice so far: fiddle with it.
<p>
See also:
<ref id="menu-fadecycle" name="menuDef::fadeCycle">,
<ref id="menu-fadeamount" name="menuDef::fadeAmount">,
<ref id="script-fadein" name="`script::fadein'">,
<ref id="script-fadeout" name="`script::fadeout'">.



<sect>itemDef { ... }
<label id="itemdef">
<p>
An itemDef describes on item member of a menu.
The following keywords are recognized inside an itemDef:

<sect1>name &string;
<label id="item-name">
<p>
Sets a name for the item.
Manipulation of an item is done through its name.
Names can correspond with a menu name, but since actions are carried out based on matching names, this could be used to create both awesome effects and terrible side-effects.
<p>
See also:
<ref id="menu-name" name="`menuDef::name'">,
<ref id="item-group" name="`itemDef::group'">.

<sect1>text &string;
<label id="item-text">
<p>
Use the provided string as a text to display
<p>Programmer's (mod) note: 
This item largely corresponds to "label" items of other GUIs).

<p>
See also:
<ref id="item-textalign" name="`itemDef::textalign'">,
<ref id="item-textalignx" name="`itemDef::textalignx'">,
<ref id="item-textaligny" name="`itemDef::textaligny'">,
<ref id="item-textscale" name="`itemDef::textscale'">,
<ref id="item-textstyle" name="`itemDef::textstyle'">.

<sect1>group &string;
<label id="item-group">
<p>
Sets a group name for the item.
This grouping also allows the manipulation of many items simultaneously (such as hiding the radio buttons together).
<p>Programmer's (mod) note: 
Primary use is in implementing radio buttons (where selecting one button in the group deselects all others in the same group).

<p>
See also:
<ref id="item-name" name="`itemDef::name'">,
<ref id="menu-name" name="`menuDef::name'">.

<sect1>asset_model &string;
<label id="item-asset_model">
<p>
Displays a Q3A model.
The provided string indicates the path name of a model to display.
View the pk3s to see the expected path names.
<!-- Rotates? -->
<p>
See also:
<ref id="item-model_origin" name="`itemDef::model_origin'">,
<ref id="item-model_fovx" name="`itemDef::model_fovx'">,
<ref id="item-model_fovy" name="`itemDef::model_fovy'">,
<ref id="item-model_rotation" name="`itemDef::model_rotation'">,
<ref id="item-model_angle" name="`itemDef::model_angle'">.

<sect1>asset_shader &string;
<label id="item-asset_shader">
<p>
<!-- 
Displays a shader?
I'm thinking along the lines of a tiles displayer or "select-a-wall-shader".
Or perhaps, like, say, selecting a crosshair?
 -->
<!-- rfactory --> Apparently not used (ineffectual).

<sect1>model_origin &float; &float; &float;
<label id="item-model_origin">
<p>
<!-- 
no idea.
Something about on-screen coordinates?
Coordinates in 3-space mapped to screen?
 -->
<!-- rfactory --> Apparently not used (ineffectual).
<p>
See also:
<ref id="item-asset_model" name="`itemDef::asset_model'">,
<ref id="item-model_fovx" name="`itemDef::model_fovx'">,
<ref id="item-model_fovy" name="`itemDef::model_fovy'">,
<ref id="item-model_rotation" name="`itemDef::model_rotation'">,
<ref id="item-model_angle" name="`itemDef::model_angle'">.

<sect1>model_fovx &float;
<label id="item-model_fovx">
<p>
Field-Of-Vision along the screen's X (horizontal) axis.
Affects horizontal (left-right) "stretchiness".
Units are degress, 90 is "normal", lesser values cause "stretching out", greater values cause "shrinking".
Most monitors have an aspect ratio of 4:3, so this value should be 3/4 of model_fovy (3 * fovx == 4 * fovy).
<p>
See also:
<ref id="item-asset_model" name="`itemDef::asset_model'">,
<ref id="item-model_origin" name="`itemDef::model_origin'">,
<ref id="item-model_fovy" name="`itemDef::model_fovy'">,
<ref id="item-model_rotation" name="`itemDef::model_rotation'">,
<ref id="item-model_angle" name="`itemDef::model_angle'">.

<sect1>model_fovy &float;
<label id="item-model_fovy">
<p>
Field-Of-Vision along the screen's Y (vertical) axis.
Affects vertical (up-down) "stretchiness".
Units are degress, 90 is "normal", lesser values cause "stretching out", greater values cause "shrinking"..
Most monitors have an aspect ratio of 4:3, so this value should be 4/3 of model_fovx (3 * fovx = 4 * fovy).
<p>
See also:
<ref id="item-asset_model" name="`itemDef::asset_model'">,
<ref id="item-model_origin" name="`itemDef::model_origin'">,
<ref id="item-model_fovx" name="`itemDef::model_fovx'">,
<ref id="item-model_rotation" name="`itemDef::model_rotation'">,
<ref id="item-model_angle" name="`itemDef::model_angle'">.

<sect1>model_rotation &int;
<label id="item-model_rotation">
<p>
Model rotation rate.
Units is number of milliseconds to wait before rotating model by 1 degree
(i.e. milliseconds per degree).
Value of zero disables rotation.
(thanks <ref id="credits-thnom" name="thnom">)
<p>
See also:
<ref id="item-asset_model" name="`itemDef::asset_model'">,
<ref id="item-model_origin" name="`itemDef::model_origin'">,
<ref id="item-model_fovx" name="`itemDef::model_fovx'">,
<ref id="item-model_fovy" name="`itemDef::model_fovy'">,
<ref id="item-model_angle" name="`itemDef::model_angle'">.

<sect1>model_angle &int;
<label id="item-model_angle">
<p>
View model from a fixed angle (angle around Z-axis, i.e. on X-Y plane).
If model_rotation is non-zero, this value acts as the base (starting) angle for rotation.
XXX: what does 0 mean?  head-on?
<p>
See also:
<ref id="item-asset_model" name="`itemDef::asset_model'">,
<ref id="item-model_origin" name="`itemDef::model_origin'">,
<ref id="item-model_fovx" name="`itemDef::model_fovx'">,
<ref id="item-model_fovy" name="`itemDef::model_fovy'">,
<ref id="item-model_rotation" name="`itemDef::model_rotation'">.

<sect1>rect &rect;
<label id="item-rect">
<p>
Defines a rectangular area within a menu.
The item's rect is positioned relative to the menu's rect; i.e. the menu's rect acts as a "mini-screen" for the coordinates of item rect.
This shifting eases the relocating of menus; menus can be moved without having to recalculate the positions of its items.
The size of a "unit" is the same as that used by the menu; i.e. no squishing-into-the-rect.
x = 640 still means move 640 "pixels" over to the right, even if off-screen.
<p>
See also:
<ref id="menu-fullscreen" name="`menuDef::fullscreen'">,
<ref id="menu-rect" name="`menuDef::rect'">.

<sect1>style &int;
<label id="item-style">
<p>
Fill style of the rect.
Values are listed in <ref id="values-style" name="Values for ``style''">.
<ref id="credits-vaejor" name="Vaejor">'s earlier tests had Q3 crashing when the value was 5 (WINDOW_STYLE_CINEMATIC); the reason was that no RoQ file was provided in a `cinematic' field.
<p>
See also:
<ref id="values-style" name="Values for ``style''">,
<ref id="menu-style" name="`menuDef::style'">,
<ref id="item-cinematic" name="`itemDef::cinematic'">,
<ref id="menu-cinematic" name="`menuDef::cinematic'">.

<sect1>decoration
<label id="item-decoration">
<p>
Presence of this keyword declares whether this item is a decoration item or not.
Non-decoration items would be hotspots, buttons, sliders, etc., items that cause actions to happen.
Decoration items would be menu border graphics, logos, animation boxes, etc.
<p>
<ref id="credits-belac" name="SweetnutZ"> points out that anything without this keyword will make mouseover sound and other assorted things.

<sect1>notselectable &int;
<label id="item-notselectable">
<p>
<!-- 
unsure.
related to listboxes.
 -->
<!-- rfactory --> Makes a List Box element unselectable. Used to make List Boxes display only.

<sect1>wrapped
<label id="item-wrapped">
<p>
Enforces manual text wrapping of the text provided in the `text' field.
The two-character sequence ``\r'' (backslash, r) causes a manual and forced wrap (newline) in texts.
<p>
<ref id="credits-belac" name="SweetnutZ"> provides an example:
<tscreen><verb>
  autowrapped
  text "here is line one of the text\r"
       "here is line two of text\r"
       "here is line three, etc etc etc"
</verb></tscreen>
<p>
See also:
<ref id="item-autowrapped" name="`itemDef::autowrapped'">.

<sect1>autowrapped
<label id="item-autowrapped">
<p>
Enforces auto-wrapping of the text provided by the `text' field.
This keyword causes the text to automatically wrap to fit within the rect.
<p>
See also:
<ref id="item-wrapped" name="`itemDef::wrapped'">.

<sect1>horizontalscroll
<label id="item-horizontalscroll">
<p>
<!-- Displays a horizontal scrollbar for listboxes. -->
<!-- XXX: always, or just when it's needed? -->
Makes a List Box scroll horiziontally rather than vertically. Only applicable if the List Box is displaying graphical elements.

<sect1>type &int;
<label id="item-type">
<p>
Sets the item type.
If not specified, the default is <ref id="item-type-text" name="ITEM_TYPE_TEXT">.
See also:
<ref id="values-item-type" name="Values for item ``type''">.

<sect1>elementwidth &float;
<label id="item-elementwidth">
<p>
Related to the width of elements inside an image listbox.
<ref id="credits-belac" name="SweetnutZ"> points out that Q3 head icons are 32 pixels wide, so ``elementwidth 32;'' would be used for an image listbox of Q3 head icons.
<p>
See also:
<ref id="item-elementheight" name="`itemDef::elementheight'">,
<ref id="item-columns" name="`itemDef::columns'">.

<sect1>elementheight &float;
<label id="item-elementheight">
<p>
As with <ref id="item-elementwidth" name="`elementwidth'">, but with element height.
<p>
See also:
<ref id="item-elementwidth" name="`itemDef::elementwidth'">.

<sect1>feeder &float;
<label id="item-feeder">
<p>
The game builds many types of lists internally (so that it may be re-updated, sorted, modified, etc.).
Feeders provide a hook to this internal list for the menu system.
Items that use feeders have a list that reflect this internal list.
The specific internal list to use is indicated by the given parameter.
<p>
Items that use a feeder are specially flagged to follow their selection.
That is to say, when you select an object in the list, the internal list "learns" which item you have just selected.
This maintains the parallel of states between the internal list and the list presented by the menu system.
<p>
<ref id="credits-belac" name="SweetnutZ"> verifies the linking into the game code for listbox data, but I'm still stumped on the use of a float, instead of int.
<p>
See also:
<ref id="values-feeder" name="Values for ``feeder''">,
<ref id="item-elementtype" name="`itemDef::elementtype'">,
<ref id="item-columns" name="`itemDef::columns'">.

<sect1>elementtype &int;
<label id="item-elementtype">
<p>
<!-- rfactory --> Specifies the type of element in a listbox, either text ("LISTBOX_TEXT", 0) or image ("LISTBOX_IMAGE", 1).
<!-- Thanks, SweetnutZ! -->
<!-- Further analysis forthcoming. -->
<!-- XXX: Analyze this some more. -->
<p>
See also:
<ref id="item-elementheight" name="`itemDef::elementheight'">,
<ref id="item-elementwidth" name="`itemDef::elementwidth'">,
<ref id="item-feeder" name="`itemDef::feeder'">.

<sect1>columns &int; &int; ... 
<label id="item-columns">
<p>
First integer is the number of columns.
Following that are sets of three integers, one set for each column just mentioned.
Each set of three integers consists of the following:
<enum>
<!-- <item>unsure: offset from the left of the item rect?  Offset from right edge of last column? -->
<!-- rfactory --> <item>offset from the left of the item rect in pixels.
<!-- rfactory --> <item>width of graphic if not text context (use 0 otherwise). Used only in HUD.
<item>maximum number of characters to display at a time.
</enum>
<p>
See also:
<ref id="item-feeder" name="`itemDef::feeder'">,
<ref id="item-elementwidth" name="`itemDef::elementwidth'">,
<ref id="item-elementheight" name="`itemDef::elementheight'">.

<sect1>border &int;
<label id="item-border">
<p>
Sets a border style for the item.
<p>
See also:
<ref id="item-bordersize" name="`itemDef::borderSize'">,
<ref id="item-bordercolor" name="`itemDef::borderColor'">,
<ref id="menu-border" name="menuDef::border'">.

<sect1>borderSize &float;
<label id="item-bordersize">
<p>
Sets the thickness of the border.
The border is drawn on the inside of the item rect.
<p>
See also:
<ref id="item-border" name="`itemDef::border'">,
<ref id="item-bordercolor" name="`itemDef::borderColor'">,
<ref id="menu-bordersize" name="`menuDef::borderSize'">.

<sect1>visible &int;
<label id="item-visible">
<p>
Sets the visibility of the item.
"0" prevents it from being drawn, "1" (or any other value) causes it to be drawn.
<p>
See also:
<ref id="item-cvartest" name="`itemDef::cvartest'">,
<ref id="item-showcvar" name="`itemDef::showCvar'">,
<ref id="item-hidecvar" name="`itemDef::hideCvar'">,
<ref id="menu-visible" name="`menuDef::visible'">,
<ref id="script-show" name="`script::show'">,
<ref id="script-hide" name="`script::hide'">.


<sect1>ownderdraw &int;
<label id="item-ownerdraw">
<p>
Like the menu's ownerdraw, this statement makes a request to the Q3A engine to draw something within the item rect.
<p>
See also:
<ref id="values-cg-ownerdraw" name="Values for cgame ``ownerdraw''">,
<ref id="values-ui-ownerdraw" name="Values for ui ``ownerdraw''">,
<ref id="item-ownerdrawflag" name="`itemDef::ownerdrawflag'">
<ref id="menu-ownerdraw" name="`menuDef::ownerdraw'">.

<sect1>align &int;
<label id="item-align">
<p>
The only uses found for this have been in the default HUDs, in conjunction with the CG_AREA_POWERUP ownerdraw.
The two known values are 0 (HUD_VERTICAL) and 1 (HUD_HORIZONTAL).
These affect the way multiple powerups are drawn, whether vertically (aligned to the bottom, sorted in sequence of remaining times) or horizontally (from left to right?).
<!-- Other uses for this are unknown. -->
<p>
See also:
<ref id="item-textalign" name="`itemDef::textalign'">.

<sect1>textalign &int;
<label id="item-textalign">
<p>
<!-- Automatically-calculated item (text) alignment. -->
<!-- rfactory --> Determines where the horizontal alignment point is applied to text.
Values are:
<descrip>
<tag>0 ITEM_ALIGN_LEFT</tag>
<!-- rfactory --> Left side of text.

<tag>1 ITEM_ALIGN_CENTER</tag>
<!-- rfactory --> Center of text.

<tag>2 ITEM_ALIGN_RIGHT</tag>
<!-- rfactory --> Right side of text.

</descrip>
<p>
See also:
<ref id="item-text" name="`itemDef::text'">,
<ref id="item-textalignx" name="`itemDef::textalignx'">,
<ref id="item-textaligny" name="`itemDef::textaligny'">,
<ref id="item-textscale" name="`itemDef::textscale'">,
<ref id="item-textstyle" name="`itemDef::textstyle'">.

<sect1>textalignx &float;
<label id="item-textalignx">
<p>
<!-- 
Manual horizonal text alignment.
Unknown units.
 -->
<!-- rfactory --> Horizontal text alignment in pixels (of 640 max) from left edge of rect to alignment point of text.
<p>
See also:
<ref id="item-text" name="`itemDef::text'">,
<ref id="item-textalign" name="`itemDef::textalign'">,
<ref id="item-textaligny" name="`itemDef::textaligny'">,
<ref id="item-textscale" name="`itemDef::textscale'">,
<ref id="item-textstyle" name="`itemDef::textstyle'">.

<sect1>textaligny &float;
<label id="item-textaligny">
<p>
<!-- 
Manual vertical text alignment.
Unknown units.
 -->
<!-- rfactory --> Vertical text alignment in pixels (of 480 max) from top edge of rect to bottom of text.
<p>
See also:
<ref id="item-text" name="`itemDef::text'">,
<ref id="item-textalign" name="`itemDef::textalign'">,
<ref id="item-textalignx" name="`itemDef::textalignx'">,
<ref id="item-textscale" name="`itemDef::textscale'">,
<ref id="item-textstyle" name="`itemDef::textstyle'">.

<sect1>textscale &float;
<label id="item-textscale">
<p>
Scale the text size.
<!-- 
For sake of reference,
the following sizes were ``eyeballed'' on a 640x480 screen: 
<descrip>
<tag>1.0</tag>
is about a 72-pt font.

<tag>0.33</tag>
is about a 16-pt font.

<tag>0.25</tag>
is about a 10-pt font.

</descrip>
 -->A scale of 1.0 is 48 pixels tall (1.0 = 48, 0.5 = 24, 0.25 = 12, 0.2 = 10; textscale = height / 48).
<p>
This statement has special effects on certain ownerdraws.
The known ones with such special effects are CG_PLAYER_AMMO_VALUE, CG_PLAYER_HEALTH, and CG_PLAYER_ARMOR_VALUE.
Each of these show a plain number if textScale is less than 0.75.
Otherwise, they show a "full-size" element of a fixed size:
<descrip>
<tag>CG_PLAYER_AMMO_VALUE</tag>
128x48 box showing all available ammo types and counts

<tag>CG_PLAYER_HEALTH</tag>
128x24 horizontal graphical bar indicating health level.

<tag>CG_PLAYER_ARMOR_VALUE</tag>
128x24 horizontal graphical bar indicating armor level.

</descrip>
<p>
See also:
<ref id="item-text" name="`itemDef::text'">,
<ref id="item-textalign" name="`itemDef::textalign'">,
<ref id="item-textalignx" name="`itemDef::textalignx'">,
<ref id="item-textaligny" name="`itemDef::textaligny'">,
<ref id="item-textstyle" name="`itemDef::textstyle'">.

<sect1>textstyle &int;
<label id="item-textstyle">
<p>
Specifies a special effect to the text.
<p>
See also:
<ref id="values-textstyle" name="Values for ``textstyle''">,
<ref id="item-text" name="`itemDef::text'">,
<ref id="item-textalign" name="`itemDef::textalign'">,
<ref id="item-textalignx" name="`itemDef::textalignx'">,
<ref id="item-textaligny" name="`itemDef::textaligny'">,
<ref id="item-textscale" name="`itemDef::textscale'">,

<sect1>backcolor &color;
<label id="item-backcolor">
<p>
Sets background color for the item when `style' is set to WINDOW_STYLE_FILLED.
<!-- This color is additive to the menu's background color, if any. -->
<p>
See also:
<ref id="item-style" name="`itemDef::style'">,
<ref id="item-background" name="`itemDef::background'">,
<ref id="item-forecolor" name="`itemDef::forecolor'">,
<ref id="item-bordercolor" name="`itemDef::bordercolor'">,
<ref id="item-outlinecolor" name="`itemDef::outlinecolor'">.


<sect1>forecolor &color;
<label id="item-forecolor">
<p>
Sets foreground color for the item.
Most prominent use is setting text color, although it also influences the color of any alpha-valued images.
<p>
See also:
<ref id="item-style" name="`itemDef::style'">,
<ref id="item-background" name="`itemDef::background'">,
<ref id="item-backcolor" name="`itemDef::backcolor'">,
<ref id="item-bordercolor" name="`itemDef::bordercolor'">,
<ref id="item-outlinecolor" name="`itemDef::outlinecolor'">.

<sect1>bordercolor &color;
<label id="item-bordercolor">
<p>
Sets border color.
<p>
See also:
<ref id="item-border" name="`itemDef::border'">,
<ref id="item-bordersize" name="`itemDef::borderSize'">,
<ref id="item-forecolor" name="`itemDef::forecolor'">,
<ref id="item-backcolor" name="`itemDef::backcolor'">,
<ref id="item-outlinecolor" name="`itemDef::outlinecolor'">,
<ref id="menu-bordercolor" name="`menuDef::borderColor'">,

<sect1>outlinecolor &color;
<label id="item-outlinecolor">
<p>
<!-- Thanks, SweetnutZ! -->
<!-- 
This keyword is known to work with text listbox, and maybe with image listbox.
The selected text is highlighted with the given color.
However, the outlining is done by drawing a box over the selection with the given color, so the best course of action is to use a very transparent color, such as "1 0 0 0.25".
 -->
<!-- rfactory --> This keyword works with text listbox.
The selected text is highlighted with the given color.
However, the outlining is done by drawing a box over the selection with the given color, so the best course of action is to use a very transparent color, such as "1 0 0 0.25".
<p>
See also:
<ref id="item-type-listbox" name="`ITEM_TYPE_LISTBOX'">,
<ref id="item-style" name="`itemDef::style'">,
<ref id="item-feeder" name="`itemDef::feeder'">,
<ref id="item-background" name="`itemDef::background'">,
<ref id="item-forecolor" name="`itemDef::forecolor'">,
<ref id="item-backcolor" name="`itemDef::backcolor'">,
<ref id="item-bordercolor" name="`itemDef::bordercolor'">,
<ref id="item-outlinecolor" name="`itemDef::outlinecolor'">.

<sect1>background &string;
<label id="item-background">
<p>
Provided string is taken as a shader name or image file to display as the item's background, confined within the item rect.
<p>
Rect's `style' has to be set to WINDOW_STYLE_SHADER.
The background image is scaled, ignoring aspect ratios, to fill the rect.
In other words, the image is distorted as needed to fill the rect completely.
See also <ref id="menu-background" name="menuDef background">.
<p>
See also:
<ref id="window-style-shader" name="`WINDOW_STYLE_SHADER'">,
<ref id="item-style" name="`itemDef::style'">,
<ref id="item-forecolor" name="`itemDef::forecolor'">,
<ref id="item-backcolor" name="`itemDef::backcolor'">.

<sect1>onFocus { &script; }
<label id="item-onfocus">
<p>
The given script is run when the item gets focus.
This happens when the mouse rolls over it, the keyboard is used to move over to it (arrow keys), or focus is forcefully thrust upon it by another script.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-button" name="ITEM_TYPE_BUTTON">,
<ref id="item-leavefocus" name="`itemDef::leaveFocus'">,
<ref id="item-forecolor" name="`itemDef::forecolor'">,
<ref id="menu-focuscolor" name="`menuDef::focusColor'">,
<ref id="script-setfocus" name="`script::setfocus'">,
<ref id="script" name="Script actions">.

<sect1>leaveFocus { &script; }
<label id="item-leavefocus">
<p>
The provided script is run when the item loses focus.
Note that when a menu closes, its last focused item runs its `leaveFocus'.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-button" name="ITEM_TYPE_BUTTON">,
<ref id="item-onfocus" name="`itemDef::onFocus'">,
<ref id="menu-onclose" name="`menuDef::onClose'">,
<ref id="menu-focuscolor" name="`menuDef::focuscolor'">,
<ref id="script" name="Script actions">.

<sect1>mouseEnter { &script; }
<label id="item-mouseenter">
<p>
Runs the provided script when the mouse enter the item's rect.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-button" name="ITEM_TYPE_BUTTON">,
<ref id="item-mouseexit" name="`itemDef::mouseExit'">,
<ref id="script" name="Script actiosn">.

<sect1>mouseExit { &script; }
<label id="item-mouseexit">
<p>
Runs the provided script when the mouse leaves the item's rect.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-button" name="ITEM_TYPE_BUTTON">,
<ref id="item-mouseenter" name="`itemDef::mouseEnter'">,
<ref id="script" name="Script action">.

<sect1>mouseEnterText { &script; }
<label id="item-mouseentertext">
<p>
<!-- 
unsure.
1) Run script when mouse touches text?
2) Run script when mouseclick is used to start editing an editfield?
 -->
<!-- rfactory --> Runs the provided script when the mouse touches text in item.
<p>
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-button" name="ITEM_TYPE_BUTTON">,
<ref id="item-mouseexittext" name="`itemDef::mouseExitText'">,
<ref id="item-mouseenter" name="`itemDef::mouseEnter'">,
<ref id="item-mouseexit" name="itemDef::mouseExit'">,
<ref id="script" name="Script actions">.

<sect1>mouseExitText { &script; }
<label id="item-mouseexittext">
<p>
<!-- 
unsure.
Presumably the exit counterpart of mouseEnterText.
 -->
<!-- rfactory --> Runs the provided script when the mouse leaves text in item.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-button" name="ITEM_TYPE_BUTTON">,
<ref id="item-mouseentertext" name="`itemDef::mouseEnterText'">,
<ref id="item-mouseenter" name="`itemDef::mouseEnter'">,
<ref id="item-mouseexit" name="itemDef::mouseExit'">,
<ref id="script" name="Script actions">.

<sect1>action { &script; }
<label id="item-action">
<p>
Runs the provided script when the mouse clicks in/on the item rect or when the Enter key is pressed while item has focus.
<!-- Script is run when mouse click or Enter key on/in the item rect. -->
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-button" name="ITEM_TYPE_BUTTON">,
<ref id="script" name="Script actions">.

<sect1>special &float;
<label id="item-special">
<p>
<!-- 
unsure.
<ref id="credits-vaejor" name="Vaejor"> suspects this may be related to spacings.
Initial inspection of the source code does show that this keyword relates to spacing between items in CG_AREA_POWERUPS (larger values put in more spaces).
This is the only known use so far.
 -->
<!-- rfactory --> Used in the HUD to set spacing on powerup item display.

<sect1>cvar &string;
<label id="item-cvar">
<p>
This keyword indicates a cvar to alter, with the various ways of altering indicated in other statements
(e.g. cvarFloat, cvarStrList, cvarFloatList, etc.)
<p>
For use in assigning keybinds, `type' has to be set to ITEM_TYPE_BIND, the `text' field holds the prompt (e.g. "Move forward:"), and `cvar' is the command to assign (e.g. "+forward").
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-bind" name="ITEM_TYPE_BIND">,
<ref id="item-cvarfloat" name="`itemDef::cvarFloat'">,
<ref id="item-cvarstrlist" name="`itemDef::cvarStrList'">,

<sect1>maxChars &int;
<label id="item-maxchars">
<p>
Maximum number of characters in an editfield.
<!-- Thanks, SweetnutZ -->
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-editfield" name="ITEM_TYPE_EDITFIELD">,
<ref id="item-maxpaintchars" name="`itemDef::maxPaintChars'">.

<sect1>maxPaintChars &int;
<label id="item-maxpaintchars">
<p>
Maximum number of characters to show in an editfield.
<!-- Thanks, SweetnutZ -->
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-editfield" name="ITEM_TYPE_EDITFIELD">,
<ref id="item-maxchars" name="`itemDef::maxChars'">.

<sect1>focusSound &string;
<label id="item-focussound">
<p>
Sound to play when item receives focus.
<p>
See also:
<ref id="item-onfocus" name="`itemDef::onFocus'">,
<ref id="script-setfocus" name="`script::setfocus'">.

<sect1>cvarFloat &string; &float; &float; &float;
<label id="item-cvarfloat">
<p>
Set a cvar to a float value.
The values correspond to:
<enum>
<item>Cvar name
<item>Default value
<item>Minimum value
<item>Maximum value
</enum>
<p>
This has commonly appeared in association with slider bars
("type ITEM_TYPE_SLIDER").
Best guess is that the lesser (left) extreme of the slider is assocated
with ``minimum'',
the greater (right) extreme associated with ``maximum'',
and the starting position of the slider at ``default''.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-slider" name="ITEM_TYPE_SLIDER">,
<ref id="item-cvar" name="`itemDef::cvar'">.

<sect1>cvarStrList { &string; &string; &lt; &string; &string; &lt; &string; &string; ... &gt; &gt; }
<label id="item-cvarstrlist">
<p>
<!-- Creates an item that rotates through a list of values. -->
<!-- rfactory --> Used in Multi item (ITEM_TYPE_MULTI) to rotate through a list of values.
Rotation occurs when the item is clicked (i.e. selecting).
The strings are provided in pairs.
The first of the pair is the string to display in the item when the pair is selected.
The second of the pair is the string to store in the cvar.
<p>
The cvar specified by `cvar' is used to store the second value of the selected pair.
<p>
Example:
<tscreen><verb>
cvarStrList { "Lightmap", "0", "Vertex Lighing", "1" }
</verb></tscreen>
<p>
This example would rotate between two values.
The strings "Lightmap" and "Vertex Lighting" are shown, while the actual values "0" and "1" are assigned.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-multi" name="ITEM_TYPE_MULTI">,
<ref id="item-cvar" name="`itemDef::cvar'">,
<ref id="item-cvarfloatlist" name="`itemDef::cvarFloatList'">.

<sect1>cvarFloatList { &string;
<label id="item-cvarfloatlist">
<p>
Works on the same principle as cvarStrList, except it stores float values instead of strings.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-multi" name="ITEM_TYPE_MULTI">,
<ref id="item-cvar" name="`itemDef::cvar'">,
<ref id="item-cvarstrlist" name="`itemDef::cvarStrList'">.

<sect1>addColorRange &float; &float; &color;
<label id="item-addcolorrrange">
<p>
Values are:
<enum>
<item>Low
<item>High
<item>Color value (RGBA)
</enum>
<p>
Applies to ownerdraw elements that have an ``obvious'' numerical value, such as health, armor, and scores.
This keyword allows the ownerdraw element to be displayed in different colors depending on its numerical value.
If the numerical value falls within ``low'' and ``high'' (inclusive), the item uses the (foreground) color that is listed.
There can be as many uses of this statement as needed to cover the appropriate range of values, up to a hard limit of 10.
After 10, additional uses are ignored.
Note that this hardlimit can be changed in mods by mod authors.
If any ranges overlap, the range listed later takes precedence.
<p>
Usage is best described by an example.
<tscreen><verb>
itemDef {
  ownerdraw CG_PLAYER_HEALTH;
  addColorRange -999 24 1 0 0 1  //Red
  addColorRange  25 100 0 1 0 1  //Green
  addColorRange 101 999 1 1 1 1  //White
}
</verb></tscreen>
<p>
The above draws the player's health.
If the health value is within -999 to 24 (inclusive), the health value shows in red.
If the health value is within 25 to 100 (inclusive), the health value shows in green.
101 and above (and up to 999), the health value shows in white.

<sect1>ownerdrawFlag &int;
<label id="item-ownerdrawflag">
<p>
Asks for a flag value (true/false) from the Q3A engine,
and shows (on "true") or hides (on "false") the item based on the value.
If the item was already invisible ("visible 0"), this item is not drawn regardless of ownerdrawFlag.
Values for ownerdrawFlag are listed in <ref id="values-cg-ownerdrawflag" name="Values for cgame ``ownerdrawFlag''">
<p>
See also:
<ref id="values-cg-ownerdrawflag" name="Values for cgame ``ownerdrawFlag''">,
<ref id="values-ui-ownerdrawflag" name="Values for ui ``ownerdrawFlag''">,
<ref id="item-ownerdraw" name="`itemDef::ownerdraw'">,
<ref id="menu-ownerdrawflag" name="`menuDef::ownerdrawflag'">.

<sect1>cinematic &string;
<label id="item-cinematic">
<p>
Play a RoQ move file in the confines of the item rect.
RoQ path name is indicated by the provided string.
<p>
See also:
<ref id="menu-cinematic" name="`menuDef::cinematic'">,
<ref id="item-type" name="`itemDef::type'">,
<ref id="window-style-cinematic" name="WINDOW_STYLE_CINEMATIC">.

<sect1>cvartest &string;
<label id="item-cvartest">
<p>
Remembers this cvar's value for testing.
Test actions are carried out by other statements, below.
<p>
See also:
<ref id="item-enablecvar" name="`itemDef::enableCvar'">,
<ref id="item-disablecvar" name="`itemDef::disableCvar'">,
<ref id="item-showcvar" name="`itemDef::showCvar'">,
<ref id="item-hidecvar" name="`itemDef::hideCvar'">.

<sect1>enableCvar { &string; &lt;; &string; &lt;; &string; ... &gt; &gt; }
<label id="item-enablecvar">
<p>
If the cvar value of `cvartest' contains any of the listed values, the item is enabled (selectable).
<p>
See also:
<ref id="item-cvartest" name="`itemDef::cvartest'">,
<ref id="item-disablecvar" name="`itemDef::disableCvar'">,
<ref id="menu-disablecolor" name="`menuDef::disableColor'">.

<sect1>disableCvar { &string; &lt;; &string; &lt;; &string; ... &gt; &gt; }
<label id="item-disablecvar">
<p>
If the cvar value of `cvartest' contains any of the listed values, the item is disabled (unselectable).
<p>
See also:
<ref id="item-cvartest" name="`itemDef::cvartest'">,
<ref id="item-enablecvar" name="`itemDef::enableCvar'">,
<ref id="menu-disablecolor" name="`menuDef::disableColor'">.

<sect1>showCvar { &string; &lt;; &string; &lt;; &string; ... &gt; &gt; }
<label id="item-showcvar">
<p>
If the cvar value of `cvartest' contains any of the listed values, the item is made visible.
<p>
See also:
<ref id="item-cvartest" name="`itemDef::cvartest'">,
<ref id="item-hidecvar" name="`itemDef::hideCvar'">,
<ref id="script-show" name="`script::show'">.

<sect1>hideCvar { &string; &lt;; &string; &lt;; &string; ... &gt; &gt; }
<label id="item-hidecvar">
<p>
If the cvar value of `cvartest' contains any of the listed values, the item is made invisible (not drawn at all).
<p>
See also:
<ref id="item-cvartest" name="`itemDef::cvartest'">,
<ref id="item-showcvar" name="`itemDef::showCvar'">,
<ref id="script-hide" name="`script::hide'">.


<sect>Script actions
<label id="script">
<p>
The &q3ta; menu language has a very basic scripting language to effect changes in other menus or items.
Multiple statements are separated by semicolon (;).

<sect1>fadein &string;
<label id="script-fadein">
<p>
Causes a fade-in effect for items/menus with names or groups matching the given string.
<p>
See also:
<ref id="script-fadeout" name="`script::fadeout'">,
<ref id="menu-fadeclamp" name="`menuDef::fadeClamp'">,
<ref id="menu-fadeamount" name="`menuDef::fadeAmount'">,
<ref id="menu-fadecycle" name="`menuDef::fadeCycle'">,
<ref id="script-transition" name="`script::transition'">.

<sect1>fadeout &string;
<label id="script-fadeout">
<p>
Causes a fade-out effect for items/menus with names or groups matching the given string.
<ref id="script-fadein" name="`script::fadein'">,
<ref id="menu-fadeclamp" name="`menuDef::fadeClamp'">,
<ref id="menu-fadeamount" name="`menuDef::fadeAmount'">,
<ref id="menu-fadecycle" name="`menuDef::fadeCycle'">,
<ref id="script-transition" name="`script::transition'">.

<sect1>show &string;
<label id="script-show">
<p>
Turns on visibility for items/menus with names or groups matching the given string.
<p>
See also:
<ref id="script-hide" name="`script::hide'">,
<ref id="item-cvartest" name="`itemDef::cvartest'">,
<ref id="item-showcvar" name="`itemDef::showcvar'">,
<ref id="item-hidecvar" name="`itemDef::hidecvar'">.

<sect1>hide &string;
<label id="script-hide">
<p>
Turns off visibility for items/menus with names or groups matching the given string.
<p>
See also:
<ref id="script-show" name="`script::show'">,
<ref id="item-cvartest" name="`itemDef::cvartest'">,
<ref id="item-showcvar" name="`itemDef::showcvar'">,
<ref id="item-hidecvar" name="`itemDef::hidecvar'">.

<sect1>open &string;
<label id="script-open">
<p>
Opens a menu with name matching the given string.
<p>
See also:
<ref id="script-close" name="`script::close'">,
<ref id="menu-onopen" name="`menuDef::onOpen'">.

<sect1>close &string;
<label id="script-close">
<p>
Closes a menu with name matching the given string.
<p>
See also:
<ref id="script-open" name="`script::open'">,
<ref id="menu-onclose" name="`menuDef::onClose'">,
<ref id="menu-onesc" name="`menuDef::onEsc'">.

<sect1>setasset &string;
<label id="script-setasset">
<p>
<!-- rfactory --> Not used (ineffectual).
<p>Programmer's (mod) note: 
Supposedly use asset with the given name, but the source code has as a no-op (empty function).

<p>
See also:
<ref id="item-asset_model" name="`itemDef::asset_model'">,
<ref id="item-asset_shader" name="`itemDef::asset_shader'">.

<sect1>setbackground &string;
<label id="script-background">
<p>
Set/change background to the given shader name or filename.
<p>
See also:
<ref id="menu-style" name="`menuDef::style'">,
<ref id="item-style" name="`itemDef::style'">,
<ref id="window-style-filled" name="WINDOW_STYLE_FILLED">,
<ref id="menu-background" name="`menuDef::background'">,
<ref id="item-background" name="`itemDef::background'">.

<sect1>setteamcolor &color;
<label id="script-setteamcolor">
<p>
Changes the teamcolor used by "style WINDOW_STYLE_TEAMCOLOR".
<p>
See also:
<ref id="menu-style" name="`menuDef::style'">,
<ref id="item-style" name="`itemDef::style'">,
<ref id="window-style-teamcolor" name="WINDOW_STYLE_TEAMCOLOR">.

<sect1>setitemcolor &string; &string; &color;
<label id="script-setitemcolor">
<p>
<enum>
<item>Item name to affect.
<item>The string "backcolor"</enum>
<p>
See also:
<ref id="item-backcolor" name="`itemDef::backcolor'">,
<ref id="item-forecolor" name="`itemDef::forecolor'">,
<ref id="item-bordercolor" name="`itemDef::borderColor'">.

<sect1>setfocus &string;
<label id="script-setfocus">
<p>
Change focus to item/group with name matching the given string.
<p>
See also:
<ref id="item-onfocus" name="`itemDef::onFocus'">,

<sect1>setplayermodel &string;
<label id="script-setplayermodel">
<p>
The cvar "team_model" is set to the given string.

<sect1>setplayerhead &string;
<label id="script-setplayerhead">
<p>
The cvar "team_headmodel" is set to the given string.

<sect1>transition &string; &rect; &rect; &int; &float;
<label id="script-transition">
<p>
Simple animation effect by altering the rect dimensions.
<enum>
<item>item/group name to affect.
<item>starting dimensions.
<item>ending dimensions.
<item>lifetime of animation</enum>
<p>
See also:
<ref id="menu-fadeclamp" name="menuDef::fadeClamp">,
<ref id="menu-fadeamount" name="menuDef::fadeAmount">,
<ref id="menu-fadecycle" name="menuDef::fadeCycle">.

<sect1>setcvar &string; &string;
<label id="script-setcvar">
<p>
First string is the name of the cvar to alter.
Second string is the value to assign to the cvar.
<p>
See also:
<ref id="item-cvartest" name="`itemDef::cvartest'">.

<sect1>exec &string;
<label id="script-exec">
<p>
Execute a string as a console command.
Note this is NOT the same "exec" to load a .cfg file.
To load a .cfg file in a menu script action, you can use:
<tscreen><verb>
exec "exec foo.cfg"
</verb></tscreen>

<sect1>play &string;
<label id="script-play">
<p>
Play the sound file or sound name indicated by the string.
<p>
See also:
<ref id="script-playlooped" name="`script::playlooped'">,
<ref id="menu-soundloop" name="`menuDef::soundLoop'">.

<sect1>playlooped &string;
<label id="script-playlooped">
<p>
Starts playing the sound in an infinite loop.
Use empty string ("") to stop loop.
<p>
See also:
<ref id="script-play" name="`script::play'">,
<ref id="menu-soundloop" name="`menuDef::soundLoop'">.

<sect1>orbit &string; &float; &float; &float; &int;
<label id="script-orbit">
<p>
Start an orbiting camera.
<enum>
<item>item to orbit (around(?))?
<item>Start angle?
<item>Delta (amount to change per step) angle?
<item>Number of seconds to spend orbiting?
</enum>
The angle values are assumed to be radian polar coordinates (distance, angle), as this makes the most sense in a rotation context that uses radian trigonometric functions.
For quick reference, 0 rad is 0 degress, 1.5707963267 is 90 degress, 3.1415926535 is 180 degress, 6.2431853070 is 360 degress.

<sect1>uiScript &string;
<label id="script-uiScript">
<p>
Activates mod-specific actions based on string.
This action is a means to trigger activity coded in the C portion of the mod.
Valid parameters are mod-dependent, but those in the baseq3/q3ta source tree is provided.
<p>
See also:
<ref id="values-uiscript" name="`Values for uiScript'">


<sect>Values for item ``type''
<label id="values-item-type">
<p>
These values are for
<ref id="item-type" name="item `type'">
field.
<p>
Determines a partcular behavior for an item.

<sect1>0 ITEM_TYPE_TEXT
<label id="item-type-text">
<p>
Text label widget
(this item type is everywhere).
Just displays a text string with no special action.
This type is also the default if a particular type isn't explicitly set.
<p>
See also:
<ref id="item-textscale" name="`itemDef::textscale'">,
<ref id="item-textalign" name="`itemDef::textalign'">,
<ref id="item-textalignx" name="`itemDef::textalignx'">,
<ref id="item-textaligny" name="`itemDef::textaligny'">,
<ref id="item-textstyle" name="`itemDef::textstyle'">,
<ref id="item-forecolor" name="`itemDef::forecolor'">,
<ref id="item-wrapped" name="`itemDef::wrapped'">,
<ref id="item-autowrapped" name="`itemDef::autowrapped'">,
<ref id="item-decoration" name="`itemDef::decoration'">.

<sect1>1 ITEM_TYPE_BUTTON
<label id="item-type-button">
<p>
A pushbutton widget.
A mouse click inside of the item rect triggers the "action" script.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-action" name="`itemDef::action'">,
<ref id="item-onfocus" name="`itemDef::onFocus'">,
<ref id="item-leavefocus" name="`itemDef::leaveFocus'">,
<ref id="item-mouseenter" name="`itemDef::mouseEnter'">,
<ref id="item-mouseexit" name="`itemDef::mouseExit'">,
<ref id="item-text" name="`itemDef::text'">,
<ref id="item-forecolor" name="`itemDeF::forecolor'">,
<ref id="menu-focuscolor" name="`itemDef::focuscolor'">,
<ref id="menu-disablecolor" name="`itemDef::disablecolor'">.

<sect1>2 ITEM_TYPE_RADIOBUTTON
<label id="item-type-radiobutton">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
Radio button widget.
Radio buttons are linked by their "group" name.
Only one button of a radio button group may be selected.
Selecting one radio button in a group causes all other buttons in the same group to deselect.

<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-text" name="ITEM_TYPE_TEXT">,
<ref id="item-cvar" name="`itemDef::cvar'">,
<ref id="item-group" name="`itemDef::group'">,
<ref id="item-onfocus" name="`itemDef::onFocus'">,
<ref id="item-leavefocus" name="`itemDef::leaveFocus'">,
<ref id="item-mouseenter" name="`itemDef::mouseEnter'">,
<ref id="item-mouseexit" name="`itemDef::mouseExit'">,
<ref id="item-text" name="`itemDef::text'">,
<ref id="item-forecolor" name="`itemDeF::forecolor'">,
<ref id="menu-focuscolor" name="`itemDef::focuscolor'">,
<ref id="menu-disablecolor" name="`itemDef::disablecolor'">.

<sect1>3 ITEM_TYPE_CHECKBOX
<label id="item-type-checkbox">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Checkbox widget.
The traditional "yes/no" marker.
Values can be stored in a cvar with the `cvar' field:
"1" is assigned on a "yes" mark,
"0" is assigned on a "no" mark.

<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-text" name="ITEM_TYPE_TEXT">,
<ref id="item-cvar" name="`itemDef::cvar'">,
<ref id="item-group" name="`itemDef::group'">,
<ref id="item-onfocus" name="`itemDef::onFocus'">,
<ref id="item-leavefocus" name="`itemDef::leaveFocus'">,
<ref id="item-mouseenter" name="`itemDef::mouseEnter'">,
<ref id="item-mouseexit" name="`itemDef::mouseExit'">,
<ref id="item-text" name="`itemDef::text'">,
<ref id="item-forecolor" name="`itemDeF::forecolor'">,
<ref id="menu-focuscolor" name="`itemDef::focuscolor'">,
<ref id="menu-disablecolor" name="`itemDef::disablecolor'">.

<sect1>4 ITEM_TYPE_EDITFIELD
<label id="item-type-editfield">
<p>
A text-entry widget.
Value can be stored to a cvar with the `cvar' field.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-text" name="ITEM_TYPE_TEXT">,
<ref id="item-cvar" name="`itemDef::cvar'">,
<ref id="item-maxchars" name="`itemDef::maxChars'">,
<ref id="item-maxpaintchars" name="`itemDef::maxPaintChars'">,
<ref id="item-onfocus" name="`itemDef::onFocus'">,
<ref id="item-leavefocus" name="`itemDef::leaveFocus'">,
<ref id="item-mouseenter" name="`itemDef::mouseEnter'">,
<ref id="item-mouseexit" name="`itemDef::mouseExit'">,
<ref id="item-text" name="`itemDef::text'">,
<ref id="item-forecolor" name="`itemDeF::forecolor'">,
<ref id="menu-focuscolor" name="`itemDef::focuscolor'">,
<ref id="menu-disablecolor" name="`itemDef::disablecolor'">.

<sect1>5 ITEM_TYPE_COMBO
<label id="item-type-combo">
<p>
<!-- XXX no idea. -->
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
A combo box is also known as a drop-down list or pop-up list.
The combo box normally appears as a single-line text.
Clicking on the combo box shows/opens a list from which an item can be selected.
The list disppears/closes to show the new item in the original rect.
Combo boxes may optionally allow the text to be edited, thereby relegating the list to a a base/shortcut/common-case selector.


<sect1>6 ITEM_TYPE_LISTBOX
<label id="item-type-listbox">
<p>
Listbox widget.
Creates a box with many items listed inside.
Multiple items can be selected.
Source of items to list is indicated by "feeder" statement.
<!-- 
XXX Multiple-selection ability can be disabled? If so, how?
 -->
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-feeder" name="`itemDef::feeder'">,
<ref id="item-elementheight" name="`itemDef::elementheight'">,
<ref id="item-elementwidth" name="`itemDef::elementwidth'">,
<ref id="item-columns" name="`itemDef::columns'">,
<ref id="item-horizontalscroll" name="`itemDef::horizontalscroll'">,
<ref id="item-notselectable" name="`itemDef::notselectable'">,


<sect1>7 ITEM_TYPE_MODEL
<label id="item-type-model">
<p>
Draw a Q3A 3D model.
Model name is provided in a <ref id="item-asset_model" name="`asset_model'"> field.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-asset_model" name="`itemDef::asset_model'">,
<ref id="script-setasset" name="`script::setasset'">.

<sect1>8 ITEM_TYPE_OWNERDRAW
<label id="item-type-ownderdraw">
<p>
Draw engine-supplied item (shader, model, health, flag status, etc.).
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="values-cg-ownerdraw" name="Values for cgame ``ownerdraw''">,
<ref id="values-cg-ownerdrawflag" name="Values for cgame ``ownerdraw''">,
<ref id="values-ui-ownerdraw" name="Values for ui ``ownerdraw''">,
<ref id="values-ui-ownerdrawflag" name="Values for ui ``ownerdrawflag''">.

<sect1>9 ITEM_TYPE_NUMERICFIELD
<label id="item-type-numericfield">
<p>
Text-entry widget restricted to only numerical characters.
An example cvar where this type is attached to is sv_maxClients (the maximal number of players allowed to connect simultaneously).
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-cvar" name="`itemDef::cvar'">,
<ref id="item-type-editfield" name="`itemDef::editField'">.

<sect1>10 ITEM_TYPE_SLIDER
<label id="item-type-slider">
<p>
A slider widget, such as for volume.
The minimum and maximum values, along with starting slider value, are provided in a `cvarFloat' statement.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-cvar" name="`itemDef::cvar'">,
<ref id="item-cvarfloat" name="`itemDef::cvarFloat'">.

<sect1>11 ITEM_TYPE_YESNO
<label id="item-type-yesno">
<p>
Pre-packaged dialog box that has a "Yes" and a "No" button.
Relieves the burden of having to specify all other elements to create a simple yes/no dialog window.
Result is stored in the cvar indicated by the `cvar' field, 1 for yes, 0 for no.
XXX: verify
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-cvar" name="`itemDef::cvar'">.

<sect1>12 ITEM_TYPE_MULTI
<label id="item-type-multi">
<p>
Multi-item widget.
Coupled with "cvarStrList" or "cvarFloatList", clicking on the item rotates through the available values/strings.
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-cvar" name="`itemDef::cvar'">,
<ref id="item-cvarstrlist" name="`itemDef::cvarStrList'">,
<ref id="item-cvarfloatlist" name="`itemDef::cvarFloatList'">.

<sect1>13 ITEM_TYPE_BIND
<label id="item-type-bind">
<p>
When the item is selected, Q3A enters a special state that traps keystrokes in order to bind it.
The action to bind to the key is indicated by the `cvar' field (e.g. cvar "+forward").
The `text' field provides the prompt (e.g. text "Move forward:").
<p>
See also:
<ref id="item-type" name="`itemDef::type'">,
<ref id="item-type-text" name="`ITEM_TYPE_TEXT'">,
<ref id="item-cvar" name="`itemDef::cvar'">.


<sect>Values for ``style''
<label id="values-style">
<p>
These are the values that can be used for the
<ref id="menu-style" name="menu `style'">
field or
<ref id="item-style" name="item `style'">
field.
Either the numeric value or the name (without quotes) can be used.

<sect1>0 WINDOW_STYLE_EMPTY
<label id="window-style-empty">
<p>
Don't add anything special.

<sect1>1 WINDOW_STYLE_FILLED
<label id="window-style-filled">
<p>
Solid fill with `backcolor', adding any fade effects parameterized in `fadeClamp', `fadeCycle', `fadeAmount'.
<p>
See also:
<ref id="item-backcolor" name="`itemDef::backcolor'">,
<ref id="menu-backcolor" name="`menuDef::backcolor'">,
<ref id="menu-fadeclamp" name="`menuDef::fadeClamp'">,
<ref id="menu-fadeamount" name="`menuDef::fadeAmount'">,
<ref id="menu-fadecycle" name="`menuDef::fadeCycle'">.

<sect1>2 WINDOW_STYLE_GRADIENT
<label id="window-style-gradient">
<p>
Gradient effect with `backcolor'.

<sect1>3 WINDOW_STYLE_SHADER
<label id="window-style-shader">
<p>
Fill with shader indicated in `background'.
<p>
See also:
<ref id="item-background" name="`itemDef::background'">,
<ref id="menu-background" name="`menuDef::background'">.

<sect1>4 WINDOW_STYLE_TEAMCOLOR
<label id="window-style-teamcolor">
<p>
Fill with team color at 33% alpha.
<p>
See also:
<ref id="script-setteamcolor" name="`script::setteamcolor'">.

<sect1>5 WINDOW_STYLE_CINEMATIC
<label id="window-style-cinematic">
<p>
Fill with cinematic (movie, RoQ format).
<p>
See also:
<ref id="item-cinematic" name="`itemDef::cinematic'">.


<sect>Values for ``border''
<label id="values-border">
<p>
These values can be used for either the the
<ref id="menu-border" name="menu `border'">
field or
<ref id="item-border" name="item `border'">
field.
You can use either the numeric value or the name (without quotes).
Borders are drawn within the boundaries of a menu/item, and the available space within shrinks according to the border size.

<sect1>0 WINDOW_BORDER_NONE
<label id="border-none">
<p>
No border is drawn.

<sect1>1 WINDOW_BORDER_FULL
<label id="border-full">
<p>
Borders are drawn along the top, bottom, left, and right edges.

<sect1>2 WINDOW_BORDER_HORZ
<label id="border-horz">
<p>
Draw only along the top and bottom (horizontal) edges.

<sect1>3 WINDOW_BORDER_VERT
<label id="border-vert">
<p>
Draw only along the left and right (vertical) edges.

<sect1>4 WINDOW_BORDER_KCGRADIENT
<label id="border-kcgradient">
<p>
Draw only along the top and bottom edges with the KC (Kevin Cloud?) Gradient effect.


<sect>Values for ``textstyle''
<label id="values-textstyle">
<p>
These values are used for the
<ref id="item-textstyle" name="item `textstyle'">
field.
Either the numeric or name value can be used.

<sect1>0 ITEM_TEXTSTYLE_NORMAL
<label id="texstyle-normal">
<p>
Normal, solid text.

<sect1>1 ITEM_TEXTSTYLE_BLINK
<label id="textstyle-blink">
<p>
Fast blinking; roughly two cycles per second (2 Hz).

<sect1>2 ITEM_TEXTSTYLE_PULSE
<label id="textstyle-pulse">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented?
Slow blinking, pulsing effect; roughly two seconds per cycle (0.5 Hz).


<sect1>3 ITEM_TEXTSTYLE_SHADOWED
<label id="textstyle-shadowed">
<p>
Drop-shadow effect.

<sect1>4 ITEM_TEXTSTYLE_OUTLINED
<label id="textstlye-outlined">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
Outline effect.


<sect1>5 ITEM_TEXTSTYLE_OUTLINESHADOWED
<label id="textstyle-outlineshadowed">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
Combined shadow and outline effect.


<sect1>6 ITEM_TEXTSTYLE_SHADOWEDMORE
<label id="textstyle-shadowedmore">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
Extra shadow effect.



<sect>Values for ``feeder''
<label id="values-feeder">
<p>
These values can be used for the
<ref id="item-feeder" name="item `feeder'">
field, used to fill up a listbox item.
Most feeders supply one item per line.
Some are multi-columned, such as in-game players listing.
For the most part, you can safely assume a feeder is single-columned (one item per line), unless otherwise indicated.

<sect1>0 FEEDER_HEADS
<label id="feeder-heads">
<p>
List of Q3A head models used in the game.
<!-- (image?) -->
<!-- rfactory --> Can be texts or images.

<sect1>1 FEEDER_MAPS
<label id="feeder-maps">
<p>
List of names of available Q3A maps (levels) for single-player mode.
Text-only.
<!-- (text?) -->
<p>
See also:
<ref id="feeder-allmaps" name="FEEDER_ALLMAPS">

<sect1>2 FEEDER_SERVERS
<label id="feeder-servers">
<p>
List of Q3A servers.
Consists of the following columns:
<enum>
<item>Host name
<item>Map name
<item>Number of clients connected
<item>Gametype
<item>Ping
</enum>
<p>
(text)
<p>
See also:
<ref id="feeder-serverstatus" name="FEEDER_SERVERSTATUS">,
<ref id="uiScript-RefreshServers" name="uiScript::RefreshServers">

<sect1>3 FEEDER_CLANS
<label id="feeder-clans">
<p>
<!-- List of Q3TA clans (team names). (text?) -->
<!-- rfactory --> Not used.

<sect1>4 FEEDER_ALLMAPS
<label id="feeder-allmaps">
<p>
List of all Q3A maps playable for an online game, according to gametype.
<!-- (text?) -->
<!-- rfactory --> Can be texts or images.
<p>
See also:
<ref id="feeder-maps" name="FEEDER_MAPS">,
<ref id="uiScript-loadArenas" name="uiScript::loadArenas">

<sect1>5 FEEDER_REDTEAM_LIST
<label id="feeder-redteam-list">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented?
Scores listing of red team.
Consists of seven columns per player/line:
<enum>

<item>Player's handicap value if any, flag (red, blue, white) instead if have flag.
<item>Team Leader icon (an "L") if player is team leader.
<item>"Ready" indicator at intermission; wins/losses in tournament mode; "Spectator" if spectating; "Leader" string.
<item>Player's name
<item>Player's score
<item>Player's time spent playing in minutes.
<item>ping time, or "connecting" string.
</enum>
<p>
(text)

<sect1>6 FEEDER_BLUETEAM_LIST
<label id="feeder-blueteam-list">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented?
Scores listing of blue team.
Consists of seven columns per player/line:
<enum>

<item>Player's handicap value if any, flag (red, blue, white) instead if have flag.
<item>Team Leader icon (an "L") if player is team leader.
<item>"Ready" indicator at intermission; wins/losses in tournament mode; "Spectator" if spectating; "Leader" string.
<item>Player's name
<item>Player's score
<item>Player's time spent playing in minutes.
<item>ping time, or "connecting" string.
</enum>
<p>
(text)


<sect1>7 FEEDER_PLAYER_LIST
<label id="feeder-player-list">
<p>
List of all players in the game.
Text-only.

<sect1>8 FEEDER_TEAM_LIST
<label id="feeder-team-list">
<p>
List of all teams in the game.
Text-only.

<sect1>9 FEEDER_MODS
<label id="feeder-mods">
<p>
List of available Q3A mods.
Text-only.
<p>
See also:
<ref id="uiScript-LoadMods" name="uiScript::LoadMods">,
<ref id="uiScript-RunMod" name="uiScript::RunMod">

<sect1>10 FEEDER_DEMOS
<label id="feeder-demos">
<p>
List of available recorded demos (file names).
Text-only.
<p>
See also:
<ref id="uiScript-LoadDemos" name="uiScript::LoadDemos">,
<ref id="uiScript-RunSPDemo" name="uiScript::RunSPDemo">

<sect1>11 FEEDER_SCOREBOARD
<label id="feeder-scoreboard">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implementd?
Scoreboard listing (non-team game?)
(text? mixed?)


<sect1>12 FEEDER_Q3HEAD
<label id="feeder-q3heads">
<p>
List of all available Q3A head models.
<!-- rfactory --> Can be text or image.

<sect1>13 FEEDER_SERVERSTATUS
<label id="feeder-serverstatus">
<p>
A listing showing the server's players over a remote query (out-of-game, as from server browser).
Consists of the following columns:
<enum>
<item>client number
<item>client score
<item>client ping
<item>client name
</enum>
<p>
(text)
<p>
See also:
<ref id="feeder-servers" name="FEEDER_SERVERS">,
<ref id="uiScript-ServerStatus" name="uiScript::ServerStatus">,
<ref id="uiScript-FoundPlayerServerStatus" name="uiScript::FoundPlayerServerStatus">

<sect1>14 FEEDER_FINDPLAYER
<label id="feeder-findplayer">
<p>
List of servers containing the player name for which you are searching.
(text)

<sect1>15 FEEDER_CINEMATICS
<label id="feeder-cinematics">
<p>
List of available cinematics (RoQ files).
(text?)
List is updated by uiScript ``LoadMovies''.
<p>
See also:
<ref id="uiScript-LoadMovies" name="uiScript::LoadMovies">,
<ref id="uiScript-playMovie" name="uiScript::playMovie">



<sect>Values for cgame ``ownerdraw''
<label id="values-cg-ownerdraw">
<p>
These are the values for the
<ref id="menu-ownerdraw" name="menu `ownerdraw'">
or
<ref id="item-ownerdraw" name="item `ownerdraw'">
field.
This set of values is used in the cgame menu, aka
<ref id="hud" name="Heads-Up Display (HUD)">.

<sect1>0 CG_OWNERDRAW_BASE
<label id="cg-ownerdraw-base">
<p>
ALL YOUR BASE ARE BELONG TO US.

<sect1>1 CG_PLAYER_ARMOR_ICON
<label id="cg-player-armor-icon">
<p>
Armor icon for the player (red or yellow), as image.

<sect1>2 CG_PLAYER_ARMOR_VALUE
<label id="cg-player-armor-value">
<p>
Armor value, as numeric text.

<sect1>3 CG_PLAYER_HEAD
<label id="cg-player-head">
<p>
The player's head model, as 3D model.

<sect1>4 CG_PLAYER_HEALTH
<label id="cg-player-health">
<p>
The player's health, as numeric text.

<sect1>5 CG_PLAYER_AMMO_ICON
<label id="cg-ammo-icon">
<p>
Icon of the ammo currently being used (matched up to the weaon in hand), as image.

<sect1>6 CG_PLAYER_AMMO_VALUE
<label id="cg-ammo-value">
<p>
Ammo count, as numeric text.

<sect1>7 CG_SELECTEDPLAYER_HEAD
<label id="cg-selectedplayer-head">
<p>
Head model of the currently selected player, as 3D model.
<!-- XXX xref selectedplayer info -->

<sect1>8 CG_SELECTEDPLAYER_NAME
<label id="cg-selectedplayer-name">
<p>
Name as the currently selected player, as text.
<!-- XXX xref selectedplayer info -->

<sect1>9 CG_SELECTEDPLAYER_LOCATION
<label id="cg-selectedplayer-location">
<p>
Location of the currently selected player, as text.
<!-- XXX xref selectedplayer info -->

<sect1>10 CG_SELECTEDPLAYER_STATUS
<label id="cg-selectedplayer-status">
<p>
Status (Attack, Defend, Escort, etc.) of currently selected player, as image.
<!-- XXX xref selectedplayer info -->

<sect1>11 CG_SELECTEDPLAYER_WEAPON
<label id="cg-selectedplayer-weapon">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Weapon wielded by currently selected player, as image.

<!-- XXX xref selectedplayer info -->

<sect1>12 CG_SELECTEDPLAYER_POWERUP
<label id="cg-selectedplayer-head">
<p>
Powerup held by currently selected player, as image.
<!-- XXX xref selectedplayer info -->

<sect1>40 CG_SELECTEDPLAYER_ARMOR
<label id="cg-selectedplayer-head">
<p>
Armor value of currently selected player, as numeric text.
<!-- XXX xref selectedplayer info -->

<sect1>41 CG_SELECTEDPLAYER_HEALTH
<label id="cg-selectedplayer-head">
<p>
Health value of currently selected player, as numeric text.
<!-- XXX xref selectedplayer info -->

<sect1>13 CG_FLAGCARRIER_HEAD
<label id="cg-flagcarrier-head">
<p>
<!-- rfactory --> Not used.

<p>Programmer's (mod) note: 
Not implemented yet.
Head model of flag carrier, as 3D model.
Note that flag carrier means "whoever on your own team that has stolen the/a flag", and not that of the other team's.


<sect1>14 CG_FLAGCARRIER_NAME
<label id="cg-flagcarrier-name">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
Name of flag carrier, as text.


<sect1>15 CG_FLAGCARRIER_LOCATION
<label id="cg-flagcarrier-location">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
Location of flag carrier, as text.


<sect1>16 CG_FLAGCARRIER_STATUS
<label id="cg-flagcarrier-status">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
Status of flag carrier, as image.


<sect1>17 CG_FLAGCARRIER_WEAPON
<label id="cg-flagcarrier-weapon">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
Weapon wielded by flag carrier, as image.


<sect1>18 CG_FLAGCARRIER_POWERUP
<label id="cg-flagcarrier-powerup">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
Powerup held by the flag carrier, as image.


<sect1>19 CG_PLAYER_ITEM
<label id="cg-player-item">
<p>
<!-- rfactory --> Item currently held by player, as image.

<sect1>20 CG_PLAYER_SCORE
<label id="cg-player-score">
<p>
Player's score, as numeric text.

<sect1>21 CG_BLUE_FLAGHEAD
<label id="cg-blue-flaghead">
<p>
Head model of red team member carrying the blue flag, as 3D model.

<sect1>22 CG_BLUE_FLAGSTATUS
<label id="cg-blue-flagstatus">
<p>
Status (Attack, Defend, Retrieve, etc.) of red team member carrying the blue flag, as image.

<sect1>23 CG_BLUE_FLAGNAME
<label id="cg-blue-flaghead">
<p>
Name of red team member carrying the blue flag, as text.

<sect1>24 CG_RED_FLAGHEAD
<label id="cg-red-flaghead">
<p>
Head model of the blue team member carrying the red flag, as image.

<sect1>25 CG_RED_FLAGSTATUS
<label id="cg-red-flagstatus">
<p>
2D icon of the red flag's status, as image.
Status is "at stand", "dropped", or "stolen".

<sect1>26 CG_RED_FLAGNAME
<label id="cg-red-flagname">
<p>
Name of the blue team member carrying the red flag, as text.

<sect1>27 CG_BLUE_SCORE
<label id="cg-blue-score">
<p>
Blue team's score, as numeric text.

<sect1>28 CG_RED_SCORE
<label id="cg-red-score">
<p>
Red team's score, as numeric text.

<sect1>29 CG_RED_NAME
<label id="red-name">
<p>
Red team's name (clan name), as text.

<sect1>30 CG_BLUE_NAME
<label id="blue-name">
<p>
Blue team's name (clan name), as text.

<sect1>31 CG_HARVESTER_SKULLS
<label id="cg-harvester-skulls">
<p>
Number of skulls collected in Harvester mode, as numeric text.

<sect1>32 CG_ONEFLAG_STATUS
<label id="cg-oneflag-status">
<p>
Status of the flag in one-flag mode (at stand, stolen, dropped), as image(?).

<sect1>33 CG_PLAYER_LOCATION
<label id="cg-player-location">
<p>
Location of player, as text.

<sect1>34 CG_TEAM_COLOR
<label id="cg-team-color">
<p>
Player's team color (e.g. for filling in a rect background color), as color.

<sect1>35 CG_CTF_POWERUP
<label id="cg-ctf-powerup">
<p>
Q3TA CTF persistent powerup held by player, as image.

<sect1>36 CG_AREA_POWERUP
<label id="cg-area-powerup">
<p>
Player's powerup in hand in CTF mode, as image.

<sect1>37 CG_AREA_LAGOMETER
<label id="cg-area-lagometer">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
Draw lagometer, as (animated) image.
The current lagometer uses the old drawing functions, drawn at a fixed location.


<sect1>38 CG_PLAYER_HASFLAG
<label id="cg-player-hasflag">
<p>
Draws the flag if the player has it, as image.
For the old-timers, this correlates to the flag icon appearing when you steal the flag
With simpleItems, this draws the 2D flag icon.
Otherwise it draws the rotating 3D model of the flag.

<sect1>39 CG_GAME_TYPE
<label id="cg-game-type">
<p>
Game type ("CTF", "One Flag", "Harvester", etc.), as text.

<sect1>42 CG_PLAYER_STATUS
<label id="cg-player-status">
<p>
Player status (Attack, Defend, Escort, etc.), as image.

<sect1>43 CG_FRAGGED_MSG
<label id="cg-fragged-msg">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet (empty function).
Probably the "You fragged ..." message, as text.


<sect1>44 CG_PROXMINED_MSG
<label id="cg-proxmined-msg">
<p>
&q3ta; proximity mine message, as text.

<sect1>45 CG_AREA_FPSINFO
<label id="cg-area-fpsinfo">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented yet.
FPS info ("## fps"), as text.
The current FPS info display uses the old draw functions, drawn at a fixed location.


<sect1>46 CG_AREA_SYSTEMCHAT
<label id="cg-area-systemchat">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not completed yet.
All system (non-chat) messages?


<sect1>47 CG_AREA_CHAT
<label id="cg-area-chat">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not completed yet.
Global (non-team?) chat texts.


<sect1>48 CG_AREA_TEAMCHAT
<label id="cg-area-teamchat">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not completed yet.
Team-only chat texts.


<sect1>49 CG_GAME_STATUS
<label id="cg-game-status">
<p>
In single player mode, ranking information (e.g. "5th place with -4 frags"), as text.
In team game, team rankings (e.g. "Red leads Blue, 42 to 17"), as text.

<sect1>50 CG_KILLER
<label id="cg-killer">
<p>
Name as text of the last player to kill you, as text.

<sect1>51 CG_PLAYER_ARMOR_ICON2D
<label id="cg-player-armor-icon2d">
<p>
Draw armor icon, as image.
<!-- 
If simpleItems is on, this item draws the 2D armor icon,
otherwise the item displays the rotating 3D armor model.
 -->
<!-- rfactory --> 2D image only.

<sect1>52 CG_PLAYER_AMMO_ICON2D
<label id="cg-player-ammo-icon2d">
<p>
Draw ammo icon for current weapon, as image.
<!-- 
With simpleItems, this draws the ammo's 2D icon,
otherwise the rotating 3D ammo model.
 -->
<!-- rfactory --> 2D image only.

<sect1>53 CG_ACCURACY
<label id="cg-accuracy">
<p>
Accuracy score, icon + text (e.g. "34%")

<sect1>54 CG_ASSISTS
<label id="cg-assists">
<p>
Assists score, icon + text (e.g. "12")

<sect1>55 CG_DEFEND
<label id="cg-defend">
<p>
Defense score, icon + text (e.g. "8")

<sect1>56 CG_EXCELLENT
<label id="cg-excellent">
<p>
Excellents score, icon + text (e.g. "3")

<sect1>57 CG_IMPRESSIVE
<label id="cg-impressive">
<p>
Impressives score, icon + text (e.g. "2")

<sect1>58 CG_PERFECT
<label id="cg-perfect">
<p>
Perfects score, icon + text (e.g. "0")

<sect1>59 CG_GAUNTLET
<label id="cg-gauntlet">
<p>
Humiliations score, icon + text (e.g. "5")

<sect1>60 CG_SPECTATORS
<label id="cg-spectators">
<p>
Marquee-effect (scrolling-to-left text) of players in spectator mode, as (scrolling) text.

<sect1>61 CG_TEAMINFO
<label id="cg-teaminfo">
<p>
The Team Info Overlay display, as image + text combination.

<sect1>62 CG_VOICE_HEAD
<label id="cg-voice-head">
<p>
Head model of the last player that sent a voice message, as image.

<sect1>63 CG_VOICE_NAME
<label id="cg-voice-name">
<p>
Name of the last player that sent a voice message, as text.

<sect1>64 CG_PLAYER_HASFLAG2D
<label id="cg-player-hasflag2d">
<p>
Flag icon when the player has the flag, as image.
With simpleItems, this draws the flat 2D icon of the flag.
Otherwise, it draws the rotating 3D flag model.
For the time being, this is does the exact same thing as CG_PLAYER_HASFLAG.
Presumably the two will either merge or take separate meanings in the future.

<sect1>65 CG_HARVESTER_SKULLS2D
<label id="cg-harvester-skulls2d">
<p>
<!-- 
unsure.
The skulls icons?
 -->
The skulls icon, as image.

<sect1>66 CG_CAPFRAGLIMIT
<label id="cg-capfraglimit">
<p>
Either the frags limit or captures limit of the game, according to game type, as text.

<sect1>67 CG_1STPLACE
<label id="cg-1stplace">
<p>
For individuals-based gametypes (Free-For-All, Tournament), the highest score, as numeric text.
For team games (TDM, CTF), score of red team, as numeric text.
Nothing/blank in single-player mode.

<sect1>68 CG_2NDPLACE
<label id="cg-2ndplace">
<p>
For individuals-based gametypes (Free-For-All, Tournament), the second-highest score, as text.
For team games (TDM, CTF), score of blue team, as text.
Nothing/blank in single-player mode.

<sect1>69 CG_CAPTURES
<label id="cg-captured">
<p>
Number of captures (icon + text) by player.



<sect1>70 CG_EXTRA
<label id="cg-extra">
<p>
Specific to &wfa;.
Shows the class-specific special equipments in use, such as lasers, sentries, depots, and alarms.

<sect1>71 CG_POINTSTATUS
<label id="cg-pointstatus">
<p>
Specific to &wfa;.
Draws the status of the command points in Command Point gametype.
Command Point involves at least three control points that must be conquered and held by a team.  A team gains some a score point per second per command point in its control.  Game ends when a team reaches the score limit.

<sect1>72 CG_HEADSHOTS
<label id="cg-headshots">
<p>
Specific to &wfa;.
Number of headshots (icon + text) by player.


<sect>Values for cgame ``ownerdrawflag''
<label id="values-cg-ownerdrawflag">
<p>
These values can be used for the
<ref id="item-ownerdrawflag" name="item `ownerdrawflag'">
field,
to control the appearance of an
<ref id="item-ownerdraw" name="`ownerdraw'">
content depending on an engine-dependent value.
A ``false'' result causes the item to remain invisible,
while a ``true'' result procedes with drawing the content.
These ownerdrawFlag values are used for the cgame menu, aka
<ref id="hud" name="Heads-Up Display (HUD)">.
For convenience, the condition for a true result is listed, while false is assumed if the listed condition is not met.
The description can be prefixed with ``Draw this when/if...'' to help clear up confusion.

<sect1>CG_SHOW_BLUE_TEAM_HAS_REDFLAG
<label id="cg-show-blue-team-has-redflag">
<p>
... blue team has the red flag.

<sect1>CG_SHOW_RED_TEAM_HAS_BLUEFLAG
<label id="cg-show-red-team-has-blueflag">
<p>
... red team has the blue flag.

<sect1>CG_SHOW_ANYTEAMGAME
<label id="cg-show-anyteamgame">
<p>
... in a team-based game mode (TDM, 1CTF, 2CTF, etc.)

<sect1>CG_SHOW_HARVESTER
<label id="cg-show-harvester">
<p>
... in Harvester game mode only.

<sect1>CG_SHOW_ONEFLAG
<label id="cg-show-oneflag">
<p>
... in One-flag CTF game mode only.

<sect1>CG_SHOW_CTF
<label id="cg-show-ctf">
<p>
... in Two-flag (traditional) CTF game mode only.

<sect1>CG_SHOW_OBELISK
<label id="cg-show-obelisk">
<p>
... in Obelisk (Overload?) game mode.
<!-- <NEWLINE>XXX What is this, Overload? -->

<sect1>CG_SHOW_HEALTHCRITICAL
<label id="cg-show-healthcritical">
<p>
... health is critically low (&lt;25).
Default HUD uses this to make the health HUD flash on low health.

<sect1>CG_SHOW_SINGLEPLAYER
<label id="cg-show-singleplayer">
<p>
... in Single-Player game (as opposed to a networked game).

<sect1>CG_SHOW_TOURNAMENT
<label id="cg-show-tournament">
<p>
... in Tournament game mode only.

<sect1>CG_SHOW_DURINGINCOMINGVOICE
<label id="cg-show-duringincomingvoice">
<p>
... a radio message comes in (Q3TA-style voice command/chat).

<sect1>CG_SHOW_IF_PLAYER_HAS_FLAG
<label id="cg-show-if-player-has-flag">
<p>
... player has the flag.
This is useful for showing a special icon only when the player him/herself has the flag.

<sect1>CG_SHOW_LANPLAYONLY
<label id="cg-show-lanplayonly">
<p>
... in Networked game (as opposed to single-player or local multiplayer [bots]).
The lagometer is an example of where this is meaningful.

<sect1>CG_SHOW_MINED
<label id="cg-show-mined">
<p>
... mine(s) has been placed (TA-style mines).

<sect1>CG_SHOW_HEALTHOK
<label id="cg-show-healthok">
<p>
... health is OK, i.e. non-critical (&gt;25).

<sect1>CG_SHOW_TEAMINFO
<label id="cg-show-teaminfo">
<p>
... Team Info is being selected/shown (teammate is not selected).
<NEWLINE>XXX need section on selectedplayer information

<sect1>CG_SHOW_NOTEAMINFO
<label id="cg-show-noteaminfo">
<p>
... Team Info is not being selected/shown (teammate is selected).
<NEWLINE>XXX again, need section on selectedplayer

<sect1>CG_SHOW_OTHERTEAMHASFLAG
<label id="cg-show-otherteamhasflag">
<p>
... other team has the/your flag (CTF, one-flag).

<sect1>CG_SHOW_YOURTEAMHASENEMYFLAG
<label id="cg-show-yourteamhasenemyflag">
<p>
... your team as the/their flag (CTF, one-flag).

<sect1>CG_SHOW_ANYNONTEAMGAME
<label id="cg-show-anynonteamgame">
<p>
... in any non-team-based games (FFA, tournament, etc.).

<sect1>CG_SHOW_2DONLY
<label id="cg-show-2donly">
<p>
... this flag is something of an anomaly, since it instructs the menu system to do something, rather than requesting a value.
It causes the ownerdraw item to be drawn in 2D form, instead of 3D, as if simpleItems were turned on.
Multiple ownerdrawFlags may be listed, with the effects being combined inclusively (boolean "OR" operation).
<NEWLINE>XXX need example.





<sect>Values for ui ``ownerdraw''
<label id="values-ui-ownerdraw">
<p>
These are the values for the
<ref id="menu-ownerdraw" name="menu `ownerdraw'">
or
<ref id="item-ownerdraw" name="item `ownerdraw'">
field.
This set of values are used in the ui menu, aka "main menu" or "ESC menu".

<sect1>0 UI_OWNERDRAW_BASE
<label id="ui-ownerdraw-base">
<p>
??

<sect1>1 UI_HANDICAP
<label id="ui-handicap">
<p>
Player's handicap, as text.
<!-- unsure as what (just number, slider bar, etc.?). -->

<sect1>2 UI_EFFECTS
<label id="ui-effects">
<p>
Player's effect (rail trail color), as slider.

<sect1>3 UI_PLAYERMODEL
<label id="ui-playermodel">
<p>
Player's chosen Q3A character model (full model, as in the setup menu), as 3D model.

<sect1>4 UI_CLANNAME
<label id="ui-clanname">
<p>
Player's clan name, as text.

<sect1>5 UI_CLANLOGO
<label id="ui-clanlogo">
<p>
Player's clanlogo, as image/shader.

<sect1>6 UI_GAMETYPE
<label id="ui-gametype">
<p>
The gametype, as text.

<sect1>7 UI_MAPPREVIEW
<label id="ui-mappreview">
<p>
The map preview (that little screenshot), as image.

<sect1>8 UI_SKILL
<label id="ui-skill">
<p>
The bot skill level, as text.
(Single-player mode only?)

<sect1>9 UI_BLUETEAMNAME
<label id="ui-blueteamname">
<p>
The blue team name, as text.

<sect1>10 UI_REDTEAMNAME
<label id="ui-redteamname">
<p>
The red team name, as text.

<sect1>11 UI_BLUETEAM1
<label id="ui-blueteam1">
<p>
Blue team leader - for use in bots setup for server/network/local multiplayer game, as text.

<sect1>12 UI_BLUETEAM2
<label id="ui-blueteam2">
<p>
Blue team member 2 - for use in bots setups for server/network/local multiplayer game, as text.

<sect1>13 UI_BLUETEAM3
<label id="ui-blueteam3">
<p>
Blue team member 3 - for use in bots setups for server/network/local multiplayer game, as text.

<sect1>14 UI_BLUETEAM4
<label id="ui-blueteam4">
<p>
Blue team member 4 - for use in bots setups for server/network/local multiplayer game, as text.

<sect1>15 UI_BLUETEAM5
<label id="ui-blueteam5">
<p>
Blue team member 5 - for use in bots setups for server/network/local multiplayer game, as text.

<sect1>16 UI_REDTEAM1
<label id="ui-redteam1">
<p>
Red team leader - for use in bots setups for server/network/local multiplayer game, as text.

<sect1>17 UI_REDTEAM2
<label id="ui-redteam2">
<p>
Red team member 2 - for use in bots setups for server/network/local multiplayer game, as text.

<sect1>18 UI_REDTEAM3
<label id="ui-redteam3">
<p>
Red team member 3 - for use in bots setups for server/network/local multiplayer game, as text.

<sect1>19 UI_REDTEAM4
<label id="ui-redteam4">
<p>
Red team member 4 - for use in bots setups for server/network/local multiplayer game, as text.

<sect1>20 UI_REDTEAM5
<label id="ui-redteam5">
<p>
Red team member 5 - for use in bots setups for server/network/local multiplayer game, as text.

<sect1>21 UI_NETSOURCE
<label id="ui-netsource">
<p>
Source of servers list: Local, Internet, MPlayer, Favorites, etc., as text.

<sect1>22 UI_NETMAPPREVIEW
<label id="ui-netmappreview">
<p>
The map preview (the little screenshot) on selected server, as image.

<sect1>23 UI_NETFILTER
<label id="ui-netfilter">
<p>
The name as text of the game-type filter on servers listing, as text.

<sect1>24 UI_TIER
<label id="ui-tier">
<p>
Tier level, as text.
Presumably only in single-player mode.
<!-- The maps on the current tier? -->

<sect1>25 UI_OPPONENTMODEL
<label id="ui-opponentmodel">
<p>
The opponent's model, as 3D model.
<p>
<ref id="credits-belac" name="SweetnutZ"> explains: Some people (pro players) like to specify the model they play against, as they feel certain models are easier to see, hit, etc.

<sect1>26 UI_TIERMAP1
<label id="ui-tiermap1">
<p>
<!-- rfactory --> Not used.
<!-- 
??
 -->

<sect1>27 UI_TIERMAP2
<label id="ui-tiermap2">
<p>
<!-- rfactory --> Not used.
<!-- 
??
 -->

<sect1>28 UI_TIERMAP3
<label id="ui-tiermap3">
<p>
<!-- rfactory --> Not used.
<!-- 
??
 -->

<sect1>29 UI_PLAYERLOGO
<label id="ui-playerlogo">
<p>
<!-- rfactory --> Player's clan graphic, as image.

<sect1>30 UI_OPPONENTLOGO
<label id="ui-opponentlogo">
<p>
<!-- rfactory --> Opponent's clan graphic, as image.

<sect1>31 UI_PLAYERLOGO_METAL
<label id="ui-playerlogo-metal">
<p>
<!-- rfactory --> Players's metal-theme clan logo, as image.
<!-- 
There is a metal-themed logo for Stroggs and Pagans.  Related?
 -->

<sect1>32 UI_OPPONENTLOGO_METAL
<label id="ui-opponentlogo-metal">
<p>
<!-- rfactory --> Opponent's metal-theme clan logo, as image.
<!-- 
There is a metal-themed logo for Stroggs and Pagans.  Related?
 -->

<sect1>33 UI_PLAYERLOGO_NAME
<label id="ui-playerlogo-name">
<p>
<!-- rfactory --> Player's clan name graphic, as image.

<sect1>34 UI_OPPONENTLOGO_NAME
<label id="ui-opponentlogo-name">
<p>
<!-- rfactory --> Opponent's clan name graphic, as image.

<sect1>35 UI_TIER_MAPNAME
<label id="ui-tier-mapname">
<p>
<!-- rfactory --> The name of the current map in the current tier, as text.

<sect1>36 UI_TIER_GAMETYPE
<label id="ui-tier-gametype">
<p>
<!-- rfactory --> The game type of the current map in the current tier, as text.

<sect1>37 UI_ALLMAPS_SELECTION
<label id="ui-allmaps-selection">
<p>
<!-- rfactory --> The name of the current net map, as text.
<!-- 
Select all maps?
List of all maps?
 -->

<sect1>38 UI_OPPONENT_NAME
<label id="ui-opponent-name">
<p>
<!-- rfactory --> The contents of cvar "ui_opponentName", as text.
<!-- 
Opponent's name as text?
 -->

<sect1>39 UI_VOTE_KICK
<label id="ui-vote-kick">
<p>
<!-- rfactory --> Not used.
<p>Programmer's (mod) note: 
Not implemented?
The kick-vote menu.


<sect1>40 UI_BOTNAME
<label id="ui-botname">
<p>
<!-- rfactory --> The name of the currently selected bot, as text.
<!-- The botname?  Which bot? -->

<sect1>41 UI_BOTSKILL
<label id="ui-botskill">
<p>
<!-- rfactory --> The skill level of the currently selected bot, as text.
<!-- The bot skill level? -->

<sect1>42 UI_REDBLUE
<label id="ui-redblue">
<p>
<!-- rfactory --> "Red" or "Blue" depending on which team the player is on, as text.

<sect1>43 UI_CROSSHAIR
<label id="ui-crosshair">
<p>
The crosshair, as image.
Set `forecolor' to something noticeable to keep this from being invisible.
<p>
See also:
<ref id="item-forecolor" name="`itemDef::forecolor'">,

<sect1>44 UI_SELECTEDPLAYER
<label id="ui-selectedplayer">
<p>
<!-- rfactory -->Selected player name, as text.
If you are the team leader draw, the contents of cvar "cg_selectedPlayerName".
Otherwise, the contents of the cvar "name".
<!-- 
The selected player?
 -->

<sect1>45 UI_MAPCINEMATIC
<label id="ui-mapcinematic">
<p>
Map preview (single-player), as cinematic.
Map selection is stored in cvar ``ui_currentMap'' and used as an integer index into the list of available single-player maps (<ref id="feeder-maps" name="FEEDER_MAPS">) (starting with 0); other parts of the ui modify the cvar accordingly.
For a given map named ``<it>mapname</iT>'', attempts to use the first matching file name in the sequence of:

<enum>

<item>"levelshots/<it>mapname</iT>_small.roq"
<item>"levelshots/<it>mapname</iT>_small.tga"
<item>"levelshots/<it>mapname</iT>_small.jpg"
<item>"menu/art/unknown.jpg"
</enum>

Mod programmers can change the sequence and extensions used.
<p>
See also:
<ref id="feeder-maps" name="`FEEDER_MAPS'">,
<ref id="ui-netmapcinematic" name="`UI_NETMAPCINEMATIC'">

<sect1>46 UI_NETGAMETYPE
<label id="ui-netgametype">
<p>
The gametype on a network game, as text.

<sect1>47 UI_NETMAPCINEMATIC
<label id="ui-netmapcinematic">
<p>
Preview of a map in a networked game, as cinematic.
Map selection is stored in ``ui_currentNetMap'' and used as an integer index into the list of all available maps (<ref id="feeder-allmaps" name="FEEDER_ALLMAPS">).
Acts just like <ref id="ui-mapcinematic" name="UI_MAPCINEMATIC">, except for the cvar and feeder sources used.
(XXX: only applicable for starting server?)
<p>
See also:
<ref id="feeder-allmaps" name="`FEEDER_ALLMAPS'">,
<ref id="ui-mapcinematic" name="`UI_MAPCINEMATIC'">

<sect1>48 UI_SERVERREFRESHDATE
<label id="ui-serverrefreshdate">
<p>
Date of last servers listings update, as text.

<sect1>49 UI_SERVERMOTD
<label id="ui-servermotd">
<p>
Server MOTD ("Message Of The Day", which has historically devolved into actually meaning "a message you see when you connect/login"), as text.

<sect1>50 UI_GLINFO
<label id="ui-glinfo">
<p>
<!-- rfactory --> Information about the active OpenGL rendering system, as multi-line text..
<!-- 
Show OpenGL info.
As text?  List?
 -->

<sect1>51 UI_KEYBINDSTATUS
<label id="ui-keybindstatus">
<p>
<!-- rfactory --> Message dependign on current status of binding a key, as text.
<itemize>

<item>If not waiting for a key to bind: "Press ENTER or CLICK to change.  Press BACKSPACE to clear."
<item>If waiting for a key to bind: "Waiting for new key... Press ESCAPE to cancel."
</itemize>


<sect1>52 UI_CLANCINEMATIC
<label id="ui-clancinematic">
<p>
<!-- rfactory --> The RoQ movie where its name matches that of the player's team logo name (the cinematic version of the team logo), as cinematic.

<sect1>53 UI_MAP_TIMETOBEAT
<label id="ui-map-timetobeat">
<p>
<!-- rfactory --> The time to beat for this map in minutes and seconds, as text.
<!-- 
Maptime to beat. (???)
 -->

<sect1>54 UI_JOINGAMETYPE
<label id="ui-joingametype">
<p>
<!-- rfactory --> The game type of the selected game (network/multiplayer server), as text.

<sect1>55 UI_PREVIEWCINEMATIC
<label id="ui-previewcinematic">
<p>
Play a cinematic.
Cinematic to play is started with the console command "cinematic MOVIE.roq" or the uiScript command "playMovie n", where 'n' is an integer index into the list of all available movie files (<ref id="feeder-cinematics" name="FEEDER_CINEMATICS">).
<p>
See also:
<ref id="menu-cinematic" name="`menuDef::cinematic'">,
<ref id="feeder-cinematics" name="`FEEDER_CINEMATICS'">,
<ref id="ui-mapcinematic" name="`FEEDER_MAPCINEMATIC'">,
<ref id="ui-netmapcinematic" name="`FEEDER_NETMAPCINEMATIC'">

<sect1>56 UI_STARTMAPCINEMATIC
<label id="ui-startmapcinematic">
<p>
<!-- rfactory --> The RoQ movie where its name matches that of the currently selected map (cinematic version of map preview), as cinematic.

<sect1>57 UI_MAPS_SELECTION
<label id="ui-maps-selection">
<p>
<!-- rfactory --> The name of the current map, as text.
<!-- List of all maps available? -->






<sect>Values for ui ``ownerdrawflag''
<label id="values-ui-ownerdrawflag">
<p>
These values can be used for the
<ref id="item-ownerdrawflag" name="item `ownerdrawflag'">
field,
to control the appearance of an
<ref id="item-ownerdraw" name="`ownerdraw'">
content depending on an engine-dependent value.
These values are used for the ui menu, aka "main menu" or "ESC menu".
Condition for a ``true'' result is listed; ``false'' if the condition(s) is/are not met.
The phrase "Draw this when/if..." may be prefixed to the description to help clarify confusion.

<sect1>UI_SHOW_LEADER
<label id="ui-show-leader">
<p>
... player is the team leader.
This flag can be used to show a team-leader-only commands submenu (such as relinquishing leadership).
Team leader is indicated by an "L" icon in the scores listing.

<sect1>UI_SHOW_NOTLEADER
<label id="ui-show-notleader">
<p>
... player is not the leader.
This flag could be used to show a box indicating the team leader.

<sect1>UI_SHOW_FAVORITESERVERS
<label id="ui-show-favoriteservers">
<p>
... on a favorite server.
A favorite server is one in the "favorite servers" list.

<sect1>UI_SHOW_ANYNONTEAMGAME
<label id="ui-show-anynonteamgame">
<p>
... in any non-team-based games (FFA, tournament, etc.).

<sect1>UI_SHOW_ANYTEAMGAME
<label id="ui-show-anyteamgame">
<p>
... in any team-based games (TDM, CTF, 1CTF, etc.).

<sect1>UI_SHOW_NEWHIGHSCORE
<label id="ui-show-newhighscore">
<p>
... player got the newest high score.
Only applicable to single-player game.

<sect1>UI_SHOW_DEMOAVAILABLE
<label id="ui-show-demoavailable">
<p>
<!-- rfactory -->
... a valid demo file exists (i.e. check if there's any demos available).

<sect1>UI_SHOW_NEWBESTTIME
<label id="ui-show-newbesttime">
<p>
... player got the newest best time.
Only applicable to single-player game.

<sect1>UI_SHOW_FFA
<label id="ui-show-ffa">
<p>
... in a FFA (Free-For-All) game type.

<sect1>UI_SHOW_NOTFFA
<label id="ui-show-notffa">
<p>
... in a non-FFA game type.

<sect1>UI_SHOW_NETANYNONTEAMGAME
<label id="ui-show-netanynonteamgame">
<p>
... in any team-based game on a network.
<p>
Useful for showing a menu item to save current server to favorite's list.
Saving a single-player server (local machine) to the list is pointless.

<sect1>UI_SHOW_NETANYTEAMGAME
<label id="ui-show-netanyteamgame">
<p>
... in any non-team-based game on a network.

<sect1>UI_SHOW_NOTFAVORITESERVERS
<label id="ui-show-notfavoriteservers">
<p>
... player is on a not-favorite server (server is not on favorites list).




<sect>Values for ``uiScript''
<label id="values-uiscript">
<p>
Many thanks to <ref id="credits-dementor" name="dementor"> for starting this section.
<p>
These values are used for
<ref id="script-uiScript" name="uiScript">.
These are game-specific internal actions that cannot be effected by .menu text alone.
These are actions carried out in the mod's C code, but triggered from the menus.
In a way, they are like hooks for actions into the mod from the menus.
Mod makers can create their own uiScript components; the pattern is in ui/ui_main.c, UI_RunMenuScript().
<p>
The listed values here appear in the source for Q3[T]A 1.27.
Values are case-insensitive, but I still preserve the capitalization as it appears in the source text.

<sect1>stopRefresh
<label id="uiScript-stopRefresh">
<p>
Stops the updating of servers list (when you try to join an online game).
In other words, queries to the master server and servers are terminated.
<p>
See also:
<ref id="uiScript-RefreshServers" name="RefreshServers">,
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-servers" name="FEEDER_SERVERS">

<sect1>LoadDemos
<label id="uiScript-LoadDemos">
<p>
Loads a list of demos to be used with the demo feeder.
This also updates the feeder source for FEEDER_DEMO.
<p>
See also:
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-demos" name="FEEDER_DEMO">,
<ref id="uiScript-RunSPDemo" name="uiScript::RunSPDemo">

<sect1>LoadMods
<label id="uiScript-LoadMods">
<p>
Loads a list of demos to be used with the mods feeder.
This also updates the feeder source for FEEDER_MODS.
If a file named `description.txt' exists in a mod directory, the first line of that file is used as the mod's name in the feeder list.
If no such file exists, the name of the directory itself is used.
<p>
See also:
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-mods" name="FEEDER_MODS">,
<ref id="uiScript-RunMod" name="uiScript::RunMod">

<sect1>playMovie
<label id="uiScript-playMovie">
<p>
Starts playing the RoQ selected in the movies list.
The movies list is any widget using a movie feeder.
<p>
See also:
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-cinematics" name="FEEDER_CINEMATICS">,
<ref id="uiScript-LoadMovies" name="uiScript::LoadMovies">

<sect1>verifyCDKey
<label id="uiScript-verifyCDKey">
<p>
Combines the cvars "cdkey1" through "cdkey4" into a single cvar "cdkey", which is then passed through the Quake3 internal cdkey verification function.
After verification is complete, the cvar "ui_cdkeyvalid" contains a message indicating the result.
<p>
See also:
<ref id="uiScript-getCDKey" name="getCDKey">

<sect1>StartServer
<label id="uiScript-StartServer">
<p>
Starts a server, and the associated online game (instead of just joining).
Initialized values include dedicated setting, gametype, number of available spots (maxClients), number of bots, bot names (if any).
<p>
See also:
<ref id="uiScript-SkirmishStart" name="uiScript::SkirmishStart">

<sect1>updateSPMenu
<label id="uiScript-updateSPMenu">
<p>
Update the Single Player menu based on latest achievements,
such as after completing a [new] arena.
<p>
See also:
<ref id="uiScript-resetScores" name="uiScript::resetScores">,
<ref id="uiScript-SkirmishStart" name="uiScript::SkirmishStart">

<sect1>resetDefaults
<label id="uiScript-resetDefaults">
<p>
Resets many settings to default: video, sound, game, input, keys.
Many of the default settings are set by running the script named 'default.cfg'.
This should be packaged in pak0.pk3.
<p>
See also:
<ref id="uiScript-glCustom" name="uiScript::glCustom">

<sect1>getCDKey
<label id="uiScript-getCDKey">
<p>
Retrieves the stored CD key from internal Quake 3 memory, and stores into 4-character pieces into cvars "cdkey1" through "cdkey4".
<p>
See also:
<ref id="uiScript-verifyCDKey" name="verifyCDKey">

<sect1>loadArenas
<label id="uiScript-loadArenas">
<p>
Loads list of maps for starting server.
<p>
See also:
<ref id="uiScript-StartServer" name="uiScript::StartServer">,
<ref id="uiScript-SkirmishStart" name="uiScript::SkirmishStart">,
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-allmaps" name="FEEDER_ALLMAPS">

<sect1>loadGameInfo
<label id="uiScript-loadGameInfo">
<p>
Parses "gameinfo.txt" file.
<!-- (XXX: wtf is 'gameinfo.txt'?) -->
Also loads (single-player) best scores for each map.
<p>
See also:
<ref id="uiScript-resetScores" name="uiScript::resetScores">

<sect1>resetScores
<label id="uiScript-resetScores">
<p>
Resets best scores for each map.
<!-- (XXX: related to gameinfo.txt?) -->
<p>
See also:
<ref id="uiScript-resetScores" name="uiScript::loadGameInfo">

<sect1>RefreshServers
<label id="uiScript-RefreshServers">
<p>
Refresh the list of servers (when you want to play online).
This clears the list, queries the master servers for list of servers, then pings each of the servers.
<p>
See also:
<ref id="uiScript-RefreshFilter" name="uiScript::RefreshFilter">,
<ref id="uiScript-ServerStatus" name="uiScript::ServerStatus">,
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-servers" name="FEEDER_SERVERS">

<sect1>RefreshFilter
<label id="uiScript-RefreshFilter">
<p>
Refresh list of servers according to filter.
This doesn't clear the list of servers, but still (re-)pings the servers in the list.
<p>
See also:
<ref id="uiScript-RefreshFilter" name="uiScript::RefreshServers">,
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-servers" name="FEEDER_SERVERS">

<sect1>RunSPDemo
<label id="uiScript-RunSPDemo">
<p>
Plays back a demo.
The demo to play is the one selected in the list that uses a demo feeder.
<p>
See also:
<ref id="uiScript-LoadDemos" name="uiScript::LoadDemos">,
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-demos" name="FEEDER_DEMOS">

<sect1>LoadMovies
<label id="uiScript-LoadMovies">
<p>
Load a list of movies.
<p>
See also:
<ref id="uiScript-playMovie" name="uiScript::playMovie">,
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-cinematics" name="FEEDER_CINEMATICS">

<sect1>RunMod
<label id="uiScript-RunMod">
<p>
Run mod selected in listbox.
The mod to load is the one selected in the list using the mods feeder.
<p>
See also:
<ref id="uiScript-LoadMods" name="uiScript::LoadMods">,
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-mods" name="FEEDER_MODS">

<sect1>Quake3
<label id="uiScript-Quake3">
<p>
Switch to baseq3 (the version without all the nifty new menu code).
<p>
See also:
<ref id="uiScript-Quit" name="uiScript::Quit">

<sect1>closeJoin
<label id="uiScript-closeJoin">
<p>
If server list refresh is in progress, the refreshing is stopped.
<!-- 
Otherwise, causes the main menu to open up (thereby causing the "Join" menu to close). -->
<p>
See also:
<ref id="uiScript-RefreshServers" name="uiScript::RefreshServers">

<sect1>ServerStatus
<label id="uiScript-ServerStatus">
<p>
Retrieve status of selected server (server cvars, player list, etc.).
The selected server is the one selected in the list using the servers feeder.
Updates the serverstatus feeder.
<p>
See also:
<ref id="uiScript-RefreshServers" name="uiScript::RefreshServers">,
<ref id="uiScript-FoundPlayerServerStatus" name="uiScript::FoundPlayerServerStatus">,
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-servers" name="FEEDER_SERVERS">,
<ref id="feeder-serverstatus" name="FEEDER_SERVERSTATUS">

<sect1>FoundPlayerServerStatus
<label id="uiScript-FoundPlayerServerStatus">
<p>
Retrieves status of server.
The selected server is the one selected in the list using the findplayer feeder.
Updates the serverstatus feeder.
<p>
See also:
<ref id="uiScript-ServerStatus" name="uiScript::ServerStatus">,
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-servers" name="FEEDER_FINDPLAYER">,
<ref id="feeder-serverstatus" name="FEEDER_SERVERSTATUS">

<sect1>FindPlayer
<label id="uiScript-FindPlayer">
<p>
Search for a player's name in the list of servers.
Player name to find is stored in the car ``ui_findPlayer''.
Color codes are stripped during search (i.e. color codes don't matter).
The specified name is searched as a substring (i.e. it can be a short piece found inside a longer name, and exact matches also show up).
Updates the findplayer feeder with the list of server names.
<p>
See also:
<ref id="feeder-findplayer" name="FEEDER_FINDPLAYER">

<sect1>JoinServer
<label id="uiScript-JoinServer">
<p>
Join the game on the selected server.
The server to join is the one selected in the list using the servers feeder.
<p>
See also:
<ref id="feeder-servers" name="FEEDER_SERVERS">,
<ref id="uiScript-RefreshServers" name="uiScript::RefreshServers">

<sect1>FoundPlayerJoinServer
<label id="uiScript-FoundPlayerJoinServer">
<p>
Joins the server with the player for whom you were searching, if found.
The server to join is the one selected in the list using the findplayer feeder.
<p>
See also:
<ref id="feeder-findplayer" name="FEEDER_FINDPLAYER">,
<ref id="uiScript-FindPlayer" name="uiScript::FindPlayer">

<sect1>Quit
<label id="uiScript-Quit">
<p>
Quits Quake 3 as a program entirely.
The cvar "ui_singlePlayerActive" is set to 0 on quitting.
(XXX: cvar ui_singlePlayerActive is used to determine if, on error condition, an error message popup window should be used (1) or not (0).  Find a better place to put this info.)
<p>
See also:
<ref id="uiScript-Leave" name="uiScript::Leave">,
<ref id="uiScript-Quake3" name="uiScript::Quake3">

<sect1>Controls
<label id="uiScript-Control">
<p>
Pauses the game (in a manner), ui module takes control of the keyboard, then menu "setup_menu2" is opened.
Basically, prepares Quake 3 for the player to set key bindings.
<p>
See also:
<ref id="item-type-bind" name="ITEM_TYPE_BIND">

<sect1>Leave
<label id="uiScript-Leave">
<p>
Quits from a game, but not Quake 3 entirely.
Main menu is opened afterwards.
<p>
See also:
<ref id="uiScript-Quit" name="uiScript::Quit">,
<ref id="uiScript-Quake3" name="uiScript::Quake3">

<sect1>ServerSort &int;
<label id="uiScript-ServerSort">
<p>
Sort the list of servers (when you want to join online game).
The parameter indicates which column to sort.
If a new column is selected, the list is sorted in ascending order.
If specified again for the second time in a row, the sort direction is reversed.
Each time the column is re-selected without a new column selected (i.e. clicking on the same column again and again), the sort direction is sorted in the other order (i.e. sort order keeps switching).
<p>
See also:
<ref id="uiScript-RefreshServers" name="uiScript::RefreshServers">,
<ref id="uiScript-RefreshFilter" name="uiScript::RefreshFilter">

<sect1>nextSkirmish
<label id="uiScript-nextSkirmish">
<p>
Single-player game, go on to next round (as from the podiums display at the end of a round).

<sect1>SkirmishStart
<label id="uiScript-SkirmishStart">
<p>
Start single-player game.
<p>
See also:
<ref id="uiScript-nextSkirmish" name="uiScript::nextSkirmish">

<sect1>glCustom
<label id="uiScript-glCustom">
<p>
Set "Video Setting" label to "Custom" (out of "Low", "Medium", "High", "Custom").
<p>
See also:
<ref id="uiScript-resetDefaults" name="uiScript::resetDefaults">

<sect1>saveControls
<label id="uiScript-saveControls">
<p>
Commits the displayed bindings setup to actual binds for Quake 3.
<p>
See also:
<ref id="uiScript-loadControls" name="uiScript::loadControls">

<sect1>loadControls
<label id="uiScript-loadControls">
<p>
Retrieves key binds from Quake 3 to set up the displayed bindings.
<p>
See also:
<ref id="uiScript-saveControls" name="uiScript::saveControls">

<sect1>clearError
<label id="uiScript-clearError">
<p>
Sets the cvar ``com_errorMessage'' to an empty string.
This, in effect, clears the stored error message.
The cvar ``com_errorMessage'' is set upon any error condition by the Quake 3 engine.
This is sort of like a bridge for error messages between the Quake 3 engine and the mod space.

<sect1>UpdateFilter
<label id="uiScript-UpdateFilter">
<p>
Refresh the list of servers with the new selected filter.
XXX: does this re-ping the servers?

<sect1>closeingame
<label id="uiScript-closeingame">
<p>
Closes the in-game menu.
The in-game menu is the menu usually bound to ESC.

<sect1>voteMap
<label id="uiScript-voteMap">
<p>
Call a vote to switch to the selected map.
The selected map is the one selected in the listbox using the allmaps feeder.
<p>
See also:
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-allmaps" name="FEEDER_ALLMAPS">

<sect1>voteKick
<label id="uiScript-voteKick">
<p>
Call a vote to kick the selected player.
The selected player is the one selected in the listbox using the player_list feeder.
<p>
See also:
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-player-list" name="FEEDER_PLAYER_LIST">

<sect1>voteGame
<label id="uiScript-voteGame">
<p>
Vote on gametype (FFA, TDM, CTF, etc.).
(XXX: parameters?)

<sect1>voteLeader
<label id="uiScript-voteLeader">
<p>
Call a vote to make the selected player the team leader.
Selected player is the one selected in the listbox using the team_list feeder.
<p>
See also:
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-player-list" name="FEEDER_TEAM_LIST">

<sect1>addBot
<label id="uiScript-addBot">
<p>
Adds a bot to the (online) game.
The selected bot is the one selected in the listbox using the heads feeder.
<p>
See also:
<ref id="item-feeder" name="itemDef::feeder">,
<ref id="feeder-heads" name="FEEDER_HEADS">

<sect1>addFavorite
<label id="uiScript-addFavorite">
<p>
Add the currently joined server to the Favorite Servers list.
(XXX: details... limits, time of saves, etc.)

<sect1>deleteFavorite
<label id="uiScript-deleteFavorite">
<p>
Delete current server from Favorite Servers list.
(XXX: same queestions as addFavorite)

<sect1>createFavorite
<label id="uiScript-createFavorite">
<p>
Add to Favorite Servers list the server specified by the cvars
``ui_favoriteName'' and ``ui_favoriteAddress''.
XXX: cvars set by user in a menu beforehand?

<sect1>orders &string;
<label id="uiScript-orders">
<p>
Canned action after selecting an order (bot directive) from in-game menu.
These orders help direct the actions of the game bots.
The string is executed as a console command and menus are closed (to resume gameplay).
If a teammate is selected with the cvar ``cg_selectedPlayer'', the order is sent to the teammate.
Otherwise, the order is sent to the entire team.

<sect1>voiceOrdersTeam &string;
<label id="uiScript-voiceOrdersTeam">
<p>
Canned action after selecting a team order from in-game menus.
The strig is exected as a console command, and the menus closed (resuming gameplay).
The order is implied to be applied to the team as a whole, so if a teammate is selected (cg_selectedPlayer), nothing is run.
<p>
See also:
<ref id="uiScript-orders" name="uiScript::orders">

<sect1>voiceOrders &string;
<label id="uiScript-voiceOrders">
<p>
Canned action after selecting a bot order from in-game menus.
The string is executed as a command, and menus closed (resuming gameplay).
The order is implied to be applied only to a single player, so if a teammate is NOT selected, nothing is run.
<p>
See also:
<ref id="uiScript-voiceOrdersTeam" name="uiScript::voiceOrdersTeam">,
<ref id="uiScript-orders" name="uiScript::orders">

<sect1>update
<label id="uiScript-update">
<p>
Synchronize cvars.
Cvars set in the menus are used to modify a set of other associated cvars.
For example, reading cvar ``ui_glCustom'' (modified by the menus) to set the values of r_vertexLight, r_mode, cg_shadows, etc (modified with uiScript update).



<sect>Heads-Up Display
<label id="hud">
<p>
The HUD is so named because it overlays information over the visual field.
This is in contrast to "looking down" at a dashboard of instruments;
a HUD provides critical information while the head is still "up".

<sect1>HUD components
<label id="hud-components">
<p>
The Q3TA HUD is a special case of the menus.
It is the menu interpreter embedded in cgame (client game).
Each HUD ``block'' is a menuDef, containing itemDefs that define the HUD contents.
The complete HUD description is actually composed of three parts:
<enum>
<item>The regular in-game HUD
<item>A non-team-game scoreboard
<item>A team-game scoreboard
</enum>
<p>
Each may be individually customized.
In fact, all three can be combined into one single file, however unwieldy that may be.
The non-team-game scoreboard is one large menuDef that <it>must</iT> be named (the `name' field) ``score_menu''.
The team-game scoreboard is one large menuDef that <it>must</iT> be named ``teamscore_menu''.
When the player wants to see the scoreboard, Q3TA hides the entire HUD,
and then display only one of the scoreboards <it>by name</iT> depending on gametype.
<p>
The regular in-game HUD to use is determined by the contents of the cvar ``cg_hudFiles''.
This value names a file that lists the in-game HUD menu files to use.
This file may not exceed 4096 bytes in size.
Default value for ``cg_hudFiles'' in Q3TA is &quot;ui/hud.txt&quot;, the content of which is:
<tscreen><verb>
{
  loadmenu { "ui/hud.menu" }
  loadmenu { "ui/score.menu" }
  loadmenu { "ui/teamscore.menu" }
}
</verb></tscreen>
<p>
The keyword ``loadmenu'' indicate the menu file to load and parse.
Multiple uses indicate multiple files to combine together.
Each of the .menu has a filesize limit of 65536 bytes (XXX: verify).
<p>
The default descriptions for the menus `score_menu' and `teamscore_menu' are defined in ui/score.menu and ui/teamscore.menu, respectively.
<p>
The command ``loadhud'' enacts the actual change of HUD.
<p>
In the event of errors, the game may crash or quit.
In the extreme case, you may have to set ``cg_hudFiles'' back to &quot;ui/hud.txt&quot; by some other means --
in the startup menus with &quot;/set cg_hudFiles ui/hud.txt&quot;, or by manually editing q3config.cfg.

<sect1>Loading Custom HUD
<label id="hud-load">
<p>
In cookbook form:
<itemize>
<item>The file ``myhud.cfg'':
<tscreen><verb>
{
  loadmenu { "myhud.menu" }
  loadmenu { "ui/score.menu" }
  loadmenu { "ui/teamscore.menu" }
}
</verb></tscreen>

<item>The file ``myhud.menu'' describing the actual HUD (like ui/hud.menu)
<item>
Commands to run in Q3 console:
<tscreen><verb>
/set cg_hudFiles myhud.cfg
/loadhud
</verb></tscreen>

<item>
Restoring the default HUD:
<tscreen><verb>
/set cg_hudFiles ui/hud.txt
/loadhud
</verb></tscreen>

</itemize>



<sect>GNU Free Documentation License
<label id="fdl">

<p>
This document is distributed under the terms of the GNU Free Documentation License, a copy of which follows.
Other copies and forms of the following is available on the World Wide Web at
<url url="http://www.gnu.org/copyleft/fdl.html">
<!-- 
or by FTP at
<url url="ftp://ftp.gnu.org/pub/gnu/COPYING.DOC">
 -->
<p>

<tscreen><verb>
		GNU Free Documentation License
		   Version 1.1, March 2000

 Copyright (C) 2000  Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.


0. PREAMBLE

The purpose of this License is to make a manual, textbook, or other
written document "free" in the sense of freedom: to assure everyone
the effective freedom to copy and redistribute it, with or without
modifying it, either commercially or noncommercially.  Secondarily,
this License preserves for the author and publisher a way to get
credit for their work, while not being considered responsible for
modifications made by others.

This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense.  It
complements the GNU General Public License, which is a copyleft
license designed for free software.

We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does.  But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book.  We recommend this License
principally for works whose purpose is instruction or reference.


1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work that contains a
notice placed by the copyright holder saying it can be distributed
under the terms of this License.  The "Document", below, refers to any
such manual or work.  Any member of the public is a licensee, and is
addressed as "you".

A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.

A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject.  (For example, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.)  The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.

The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License.

The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License.

A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, whose contents can be viewed and edited directly and
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters.  A copy made in an otherwise Transparent file
format whose markup has been designed to thwart or discourage
subsequent modification by readers is not Transparent.  A copy that is
not "Transparent" is called "Opaque".

Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML designed for human modification.  Opaque formats include
PostScript, PDF, proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML produced by some word processors for output
purposes only.

The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page.  For works in
formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.


2. VERBATIM COPYING

You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License.  You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute.  However, you may accept
compensation in exchange for copies.  If you distribute a large enough
number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and
you may publicly display copies.


3. COPYING IN QUANTITY

If you publish printed copies of the Document numbering more than 100,
and the Document's license notice requires Cover Texts, you must enclose
the copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover.  Both covers must also clearly and legibly identify
you as the publisher of these copies.  The front cover must present
the full title with all words of the title equally prominent and
visible.  You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.

If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a publicly-accessible computer-network location containing a complete
Transparent copy of the Document, free of added material, which the
general network-using public has access to download anonymously at no
charge using public-standard network protocols.  If you use the latter
option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this
Transparent copy will remain thus accessible at the stated location
until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to
the public.

It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.


4. MODIFICATIONS

You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it.  In addition, you must do these things in the Modified Version:

A. Use in the Title Page (and on the covers, if any) a title distinct
   from that of the Document, and from those of previous versions
   (which should, if there were any, be listed in the History section
   of the Document).  You may use the same title as a previous version
   if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
   responsible for authorship of the modifications in the Modified
   Version, together with at least five of the principal authors of the
   Document (all of its principal authors, if it has less than five).
C. State on the Title page the name of the publisher of the
   Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
   adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
   giving the public permission to use the Modified Version under the
   terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
   and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section entitled "History", and its title, and add to
   it an item stating at least the title, year, new authors, and
   publisher of the Modified Version as given on the Title Page.  If
   there is no section entitled "History" in the Document, create one
   stating the title, year, authors, and publisher of the Document as
   given on its Title Page, then add an item describing the Modified
   Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for
   public access to a Transparent copy of the Document, and likewise
   the network locations given in the Document for previous versions
   it was based on.  These may be placed in the "History" section.
   You may omit a network location for a work that was published at
   least four years before the Document itself, or if the original
   publisher of the version it refers to gives permission.
K. In any section entitled "Acknowledgements" or "Dedications",
   preserve the section's title, and preserve in the section all the
   substance and tone of each of the contributor acknowledgements
   and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
   unaltered in their text and in their titles.  Section numbers
   or the equivalent are not considered part of the section titles.
M. Delete any section entitled "Endorsements".  Such a section
   may not be included in the Modified Version.
N. Do not retitle any existing section as "Endorsements"
   or to conflict in title with any Invariant Section.

If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant.  To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.

You may add a section entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.

You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version.  Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity.  If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.

The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.


5. COMBINING DOCUMENTS

You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice.

The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy.  If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections entitled "History"
in the various original documents, forming one section entitled
"History"; likewise combine any sections entitled "Acknowledgements",
and any sections entitled "Dedications".  You must delete all sections
entitled "Endorsements."


6. COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.

You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.


7. AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, does not as a whole count as a Modified Version
of the Document, provided no compilation copyright is claimed for the
compilation.  Such a compilation is called an "aggregate", and this
License does not apply to the other self-contained works thus compiled
with the Document, on account of their being thus compiled, if they
are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one quarter
of the entire aggregate, the Document's Cover Texts may be placed on
covers that surround only the Document within the aggregate.
Otherwise they must appear on covers around the whole aggregate.


8. TRANSLATION

Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections.  You may include a
translation of this License provided that you also include the
original English version of this License.  In case of a disagreement
between the translation and the original English version of this
License, the original English version will prevail.


9. TERMINATION

You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License.  Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License.  However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.


10. FUTURE REVISIONS OF THIS LICENSE

The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time.  Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.  See
http://www.gnu.org/copyleft/.

Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation.  If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.


ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:

      Copyright (c)  YEAR  YOUR NAME.
      Permission is granted to copy, distribute and/or modify this document
      under the terms of the GNU Free Documentation License, Version 1.1
      or any later version published by the Free Software Foundation;
      with the Invariant Sections being LIST THEIR TITLES, with the
      Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
      A copy of the license is included in the section entitled "GNU
      Free Documentation License".

If you have no Invariant Sections, write "with no Invariant Sections"
instead of saying which ones are invariant.  If you have no
Front-Cover Texts, write "no Front-Cover Texts" instead of
"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.

If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.

</verb></tscreen>

</article>

