Torque 3D - Script Manual: GuiGameListOptionsCtrl Class Reference

TorqueScript

Main   Class List   Namespace List   Online

GuiGameListOptionsCtrl Class Reference
[Game Controls]

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

Inheritance diagram for GuiGameListOptionsCtrl:

List of all members.

Public Member Functions

void addRow (string label, string options, bool wrapOptions, string callback, int icon=-1, int yPad=0, bool enabled=true)
 Add a row to the list control.
string getCurrentOption (int row)
 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.

See also:
GuiGameListOptionsProfile

Member Function Documentation

void GuiGameListOptionsCtrl::addRow ( string  label,
string  options,
bool  wrapOptions,
string  callback,
int  icon = -1,
int  yPad = 0,
bool  enabled = true 
)

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.
string GuiGameListOptionsCtrl::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.
Returns:
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.
bool GuiGameListOptionsCtrl::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.
Returns:
True if the row contained the option and was set, false otherwise.
void GuiGameListOptionsCtrl::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.


Copyright © GarageGames, LLC. All Rights Reserved.