Items in plain font is a keyword.
Items within square brackets ([]) are required.
Items within angle brackets (<>) are optional.
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.
A ``int'' type is an integer number, negative or not, with no fractional (decimal) portion.
A ``float'' type is a floating point number, negative or not, with or without a fractional (decimal) portion.
A ``color'' type is four sequential floats, indicating a RGBA value. Each float corresponds to:
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").
A ``rect'' type is four sequential ints. The four numbers correspond to:
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.
The special marker XXX indicates meta-notes/hints about incompleteness in some form.
The description of menus can lay across many files. In fact, the Quake III: Team Arena main menu is described across more than 30 files. There are three main components to the menu system:
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.
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.