Next Previous Contents

7. Values for item ``type''

These values are for item `type' field.

Determines a partcular behavior for an item.

7.1 0 ITEM_TYPE_TEXT

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.

See also: `itemDef::textscale', `itemDef::textalign', `itemDef::textalignx', `itemDef::textaligny', `itemDef::textstyle', `itemDef::forecolor', `itemDef::wrapped', `itemDef::autowrapped', `itemDef::decoration'.

7.2 1 ITEM_TYPE_BUTTON

A pushbutton widget. A mouse click inside of the item rect triggers the "action" script.

See also: `itemDef::type', `itemDef::action', `itemDef::onFocus', `itemDef::leaveFocus', `itemDef::mouseEnter', `itemDef::mouseExit', `itemDef::text', `itemDeF::forecolor', `itemDef::focuscolor', `itemDef::disablecolor'.

7.3 2 ITEM_TYPE_RADIOBUTTON

Not used.

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.

See also: `itemDef::type', ITEM_TYPE_TEXT, `itemDef::cvar', `itemDef::group', `itemDef::onFocus', `itemDef::leaveFocus', `itemDef::mouseEnter', `itemDef::mouseExit', `itemDef::text', `itemDeF::forecolor', `itemDef::focuscolor', `itemDef::disablecolor'.

7.4 3 ITEM_TYPE_CHECKBOX

Not used.

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.

See also: `itemDef::type', ITEM_TYPE_TEXT, `itemDef::cvar', `itemDef::group', `itemDef::onFocus', `itemDef::leaveFocus', `itemDef::mouseEnter', `itemDef::mouseExit', `itemDef::text', `itemDeF::forecolor', `itemDef::focuscolor', `itemDef::disablecolor'.

7.5 4 ITEM_TYPE_EDITFIELD

A text-entry widget. Value can be stored to a cvar with the `cvar' field.

See also: `itemDef::type', ITEM_TYPE_TEXT, `itemDef::cvar', `itemDef::maxChars', `itemDef::maxPaintChars', `itemDef::onFocus', `itemDef::leaveFocus', `itemDef::mouseEnter', `itemDef::mouseExit', `itemDef::text', `itemDeF::forecolor', `itemDef::focuscolor', `itemDef::disablecolor'.

7.6 5 ITEM_TYPE_COMBO

Not used.

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.

7.7 6 ITEM_TYPE_LISTBOX

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.

See also: `itemDef::type', `itemDef::feeder', `itemDef::elementheight', `itemDef::elementwidth', `itemDef::columns', `itemDef::horizontalscroll', `itemDef::notselectable',

7.8 7 ITEM_TYPE_MODEL

Draw a Q3A 3D model. Model name is provided in a `asset_model' field.

See also: `itemDef::type', `itemDef::asset_model', `script::setasset'.

7.9 8 ITEM_TYPE_OWNERDRAW

Draw engine-supplied item (shader, model, health, flag status, etc.).

See also: `itemDef::type', Values for cgame ``ownerdraw'', Values for cgame ``ownerdraw'', Values for ui ``ownerdraw'', Values for ui ``ownerdrawflag''.

7.10 9 ITEM_TYPE_NUMERICFIELD

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).

See also: `itemDef::type', `itemDef::cvar', `itemDef::editField'.

7.11 10 ITEM_TYPE_SLIDER

A slider widget, such as for volume. The minimum and maximum values, along with starting slider value, are provided in a `cvarFloat' statement.

See also: `itemDef::type', `itemDef::cvar', `itemDef::cvarFloat'.

7.12 11 ITEM_TYPE_YESNO

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

See also: `itemDef::type', `itemDef::cvar'.

7.13 12 ITEM_TYPE_MULTI

Multi-item widget. Coupled with "cvarStrList" or "cvarFloatList", clicking on the item rotates through the available values/strings.

See also: `itemDef::type', `itemDef::cvar', `itemDef::cvarStrList', `itemDef::cvarFloatList'.

7.14 13 ITEM_TYPE_BIND

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:").

See also: `itemDef::type', `ITEM_TYPE_TEXT', `itemDef::cvar'.


Next Previous Contents