Game Development Community

quick GUI questions

by Mikael Pettersson · in Torque 3D Professional · 06/07/2011 (4:26 pm) · 7 replies

Hey, i just want some quick pointers...
I want to make some new GUI controls for my project. Mostly just because i would like to leave the GG gui intakt and seperate from the game gui. so it will mostly just be cosmetic changes (GuiWindowCTRL etc).
but I can't seem to find any documentation on the subject, and I can't seem to find the scripts that handles the controls in Torsion.
could anyone please just give me some pointers on where I can read more on this subject?

#1
06/07/2011 (4:33 pm)
open your t3d folder and go to the documentation folder. they have a very good gui section in the new docs for the final release
#2
06/07/2011 (5:00 pm)
yea, but that doesn't mention anyting about creating new gui controls.
#3
06/07/2011 (7:02 pm)
ok, i thought you just meant pure cosmetic. What type of controls are you trying to make?
#4
06/08/2011 (3:44 am)
Well the changes are purely cosmetic. But i want to make a new style without messing with the controls that are used by the editors etc.
#5
06/08/2011 (8:28 am)
The GUI comes in two, possibly three, necessary aspects. The Control is the gui object you position and deal with on the screen. The profile (and every control has one) gives certain basic properties to any control that references it.

Take any GUI you wish to modify, look at it's Controls and examine their Profiles - most everything is self explanatory. Profiles are shared in common among the various Controls, so a single change to just one Profile can cause a ripple effect of changes throughout. Create some new Profiles that contain the alterations you're looking for, then make the existing Control reference the new Profile. Depending on the changes in the Profile you then may have to adjust some properties of the Control itself.

The third aspect of GUI design is the scripting side of things, which is how you control the interaction with a GUI. This is also were radically new behavior can be introduced.
#6
06/08/2011 (1:03 pm)
ok, so i can create new profiles without having it affect the tools/editor GUIs?
#7
06/08/2011 (2:02 pm)
Yep. Create a bunch of game specific profiles which are variations of the stock profiles, then in your game specific gui controls reference the new profiles. Make as many changes as you want to the game specific profiles and it will not affect anything that uses the stock 'core' profiles.