Game Development Community

Gui Controls

by rmullen · in Torque Game Builder · 04/19/2006 (10:55 am) · 4 replies

I've been playing with the Gui editor and through a process of disecting the existing Gui files trying to determine the difference between the many different controls. There are so many, and each one can use many different profiles. Is there a list of what each control is designed to do? Is there a list describing all of the different profiles? Where are the profile propertys defined, and how could i define new ones?

If such list exist, please point me in that direction. If not, perhaps we could see one soon? Even if it was in instalments it would be a great help. It would probably be a great push for everyone in terms of getting some great games out there. I know it would help me, and at least save me from having to brute force my way through learning the powerful Gui editor.

#1
04/19/2006 (11:19 am)
For GUI Profiles see /common/gui/profiles.cs as well as this thread. :)


- Tom
#2
04/19/2006 (11:57 am)
Much appreciated, Tom. :)

Okay, after looking in profiles.cs, it looks like they're using code as in this sample, copied from said .cs file:

if(!isObject(GuiTextEditProfile)) new GuiControlProfile (GuiTextEditProfile)
{
   opaque = true;
   fillColor = "255 255 255";
   fillColorHL = "128 128 128";
   border = -2;
   bitmap = "./images/textEdit";
   borderColor = "40 40 40 100";
   fontColor = "0 0 0";
   fontColorHL = "255 255 255";
   fontColorNA = "128 128 128";
   textOffset = "4 2";
   autoSizeWidth = false;
   autoSizeHeight = true;
   tab = true;
   canKeyFocus = true;
};

I've looked rather hurriedly, but does there seem to be a list of the properties available? I can see that there is an 'opaque = true/false' option. The entry following this one uses 'opaque=false' and the fill color (for example) uses 4 parameters instead of three. I assume that the extra param is the transparency, but which one?

Thanks for any help that might be provided. I'm still learning my way around the forums and TDN and TGB in general, so please forgive any noobish questions I might ask.
#3
04/19/2006 (12:08 pm)
No problem. :)

If you had
fillColor = "255 255 255 125";
Then that 125 would be your transparency.

If you create a new GUI object and name it, say GUIObj, you can call
GUIObj.dump();
From the console to give you a list of properties and functions based on that control.

Hope that helps,
- Tom.
#4
04/19/2006 (3:07 pm)
Great, thanks. I'm still getting the hang of the editor, there seem to be some quirks that I still don't understand. Thanks for all your help.