GuiTextCtrl

consoledoc.h

GUI control object this displays a single line of text, without TorqueML.

More...

Public Attributes

int

Defines the maximum length of the text. The default is 1024.

caseString

The text to show on the control.

string

Maps the text of this control to a variable used in localization, rather than raw text.

Public Functions

void
setText(string text)

Sets the text in the control.

void
setTextID(string textID)

Maps the text ctrl to a variable used in localization, rather than raw text.

Detailed Description

GUI control object this displays a single line of text, without TorqueML.

new GuiTextCtrl()
{
   text = "Hello World";
   textID = ""STR_HELLO"";
   maxlength = "1024";
    //Properties not specific to this control have been omitted from this example.
};

Public Attributes

int maxLength 

Defines the maximum length of the text. The default is 1024.

caseString text 

The text to show on the control.

string textID 

Maps the text of this control to a variable used in localization, rather than raw text.

Public Functions

setText(string text)

Sets the text in the control.

Parameters:

text

Text to display in the control.

// Set the text to show in the control
%text = "Gideon - Destroyer of World";

// Inform the GuiTextCtrl control to change its text to the defined value
%thisGuiTextCtrl.setText(%text);

setTextID(string textID)

Maps the text ctrl to a variable used in localization, rather than raw text.

Parameters:

textID

Name of variable text should be mapped to

// Inform the GuiTextCtrl control of the textID to use
%thisGuiTextCtrl.setTextID("STR_QUIT");