Game Development Community

How do you load a gui into the GUI builder?

by Dan Phillips · in Torque Game Builder · 10/08/2006 (12:59 pm) · 8 replies

Gui builder is very confusing.

#1
10/08/2006 (9:23 pm)
Confusing is a relative term ;) It will help people to help you here if you can explain what is confusing you.

You can load and show a gui by calling

exec( "yourguifilename" ); //yourguifilename is the name of your gui file
Canvas.push( guiname );    //guiname is the name of your gui
#2
10/09/2006 (9:51 am)
To enter Gui builder
- F10

To exit Gui builder
- Choose "LevelBuilderBase" Gui from the drop down list (top-middle)
- click F10

To save You Menu/Gui
- File > Save
P.S. Notice that you MUST becareful so that not save your Gui into other project since the dialog menu sometimes loaded up two proj, and i saved to the wrong project and end up with cant find my .gui file :p

Things to do before fire up your tgb.exe
- open main.cs
- exec(~/gui/yourgui.gui);
- then only you open tgb.exe
#3
10/09/2006 (2:23 pm)
Here is something I added to my GUI editor code to drop back to the level editor quickly after using the GUI editor.

in TorqueGameBuilderPro\games\tools\guiEditor\gui\guiEditor.ed.cs
line 122, inside function GuiEditorOpen
GuiEditorMenuBar.addMenuItem("File", "Exit To Level Editor", 5);                         
   GuiEditorMenuBar.scriptCommand["File", 5] = "toggleLevelEditor();toggleLevelEditor();";
#4
10/09/2006 (10:34 pm)
Thanks, didn't realize you had to exec the gui to be able to load it.

Justs little annoyances but it would be nice to have a save instead of always having to save as. Wish ctrl+a worked in the text boxes. Wish there was more feedback when you changed things. Wish that the open gui dropdown box had folders that expanded so it wasn't so cluttered.
#5
10/14/2006 (3:40 am)
It would help us greatly if you posted any suggestions in our Suggestions Forum. We value your opinion and definately appreciate feedback :)
#6
10/22/2006 (11:16 pm)
I created a getting started tutorial that deals with this. You can view it here:
Your First GUI Tutorial
#7
10/22/2006 (11:54 pm)
Dang amanda, really busting out the TDN resources these days :) (nice work!)
#8
10/23/2006 (12:59 pm)
What can I say? I'm a programmer writer by day. It's in my nature to document everything I do. :)