Game Development Community

Change GUI Attributes via Script

by Edward A. Kimsa-Rowntree · in Torque Game Engine Advanced · 11/06/2007 (6:34 pm) · 2 replies

Is there a way to access a GUI object in TorqueScript and modify its attributes. Say for example I wanted to change its rotation, is that easily done in TorqueScript, and if so how?

#1
11/07/2007 (1:47 am)
GUI Objects (beside the general editor controls) only exist in script actually, so you can access quite a lot on them (normally it is changed by changing their fields)
#2
11/07/2007 (4:37 am)
One way to approach this is to go into the GUI editor (F10), create some gui, give it a name (like myMLTextEditCtrl) , then exit the GUI editor, open up the command console (~) and issue a dump command on that GUI object (something like myMLTextEditCtrl.dump();). From that, you can see all kinds of parameters that can be changed, as well as commands that can be issued to the control. Pretty cool stuff.