'.setText()' Method for GuiWindowsCtrl
by Mquaker · 02/22/2011 (4:59 pm) · 1 comments
[GuiWindowCtrl.h]
declare 'setText' function into 'class GuiWindowCtrl : public GuiContainer'.
[GuiWindowCtrl.cpp]
difinition function and ConsoleMethod 'setText' into any place.
recompile.
now, you can use '.setText' Method to GuiWindowCtrl.
ex)
declare 'setText' function into 'class GuiWindowCtrl : public GuiContainer'.
void setText(const char *text);
[GuiWindowCtrl.cpp]
difinition function and ConsoleMethod 'setText' into any place.
void GuiWindowCtrl::setText(const char *text)
{
mText = StringTable->insert((UTF8*)text, true);
}
ConsoleMethod( GuiWindowCtrl, setText, void, 3, 3, "() - Sets the window title." )
{
TORQUE_UNUSED(argc);
object->setText(argv[2]);
}recompile.
now, you can use '.setText' Method to GuiWindowCtrl.
ex)
YourWindowCtrlName.setText( "TEST WINDOW" ); or ParentGuiGroup-->YourWindowCtrlInternalName.setText( "TEST WINDOW" );
About the author
visit : http://www.quakedev.net

Torque Owner Robert Fritzen
Phantom Games Development
My method is just to simply set .name = ""; before I open the window and it works fine, but this is a nice method too.