Torque3D Documentation / _generateds / GuiGameListOptionsCtrl

GuiGameListOptionsCtrl

consoledoc.h

A control for showing pages of options that are gamepad friendly.

More...

Public Functions

void
addRow(string label, string options, bool wrapOptions, string callback, int icon, int yPad, bool enabled)

Add a row to the list control.

void

Sets the list of options on the given row.

string

Gets the text for the currently selected option of the given row.

bool
selectOption(int row, string option)

Set the row's current option to the one specified.

void
setOptions(int row, string optionsList)

Sets the list of options on the given row.

Detailed Description

A control for showing pages of options that are gamepad friendly.

Each row in this control allows the selection of one value from a set of options using the keyboard, gamepad or mouse. The row is rendered as 2 columns: the first column contains the row label, the second column contains left and right arrows (for mouse picking) and the currently selected value.

Public Functions

addRow(string label, string options, bool wrapOptions, string callback, int icon, int yPad, bool enabled)

Add a row to the list control.

Parameters:

label

The text to display on the row as a label.

options

A tab separated list of options.

wrapOptions

Specify true to allow options to wrap at each end or false to prevent wrapping.

callback

Name of a script function to use as a callback when this row is activated.

icon

[optional] Index of the icon to use as a marker.

yPad

[optional] An extra amount of height padding before the row. Does nothing on the first row.

enabled

[optional] If this row is initially enabled.

clearOptions()

Sets the list of options on the given row.

Parameters:

row

Index of the row to set options on.

optionsList

A tab separated list of options for the control.

getCurrentOption(int row)

Gets the text for the currently selected option of the given row.

Parameters:

row

Index of the row to get the option from.

return:

A string representing the text currently displayed as the selected option on the given row. If there is no such displayed text then the empty string is returned.

selectOption(int row, string option)

Set the row's current option to the one specified.

Parameters:

row

Index of the row to set an option on.

option

The option to be made active.

return:

True if the row contained the option and was set, false otherwise.

setOptions(int row, string optionsList)

Sets the list of options on the given row.

Parameters:

row

Index of the row to set options on.

optionsList

A tab separated list of options for the control.