Game Development Community

GUI Builder (Questions about editing gui's)

by Dustin Sims · in Torque Game Builder · 12/03/2006 (2:36 pm) · 2 replies

I am working through the basics of TGB and am trying to create a very small, basic, yet Complete game.
I have a question about the GUI Builder.
How do you open existing GUI's in the Editor.

For example, the Whack-a-Mole Example has an Endgame.gui but I can not seem to figure out how to open it up for editing.It doesn't appear in the middle drop-down list. It also seems odd that there is a New GUI menu and a Save GUI menu but no Open GUI menu option..
If someone could help, I would Appreciate it. Thanks...

#1
12/05/2006 (2:56 am)
In order for a GUI file to appear in the middle dropdown list, it must "exist" first, meaning you have to execute the file. I don't have the Wack-a-Mole project in front of me, but my best guess would be that it's executing Endgame.gui in the StartGame function in game.cs, so the GUI doesn't exist to the engine until the level is played. You should be able to run the level and then find the Endgame GUI in the center dropdown of the Gui Builder after returning to the editor.

If not, it's possible that they named the GUI something else for whatever reason. You can open up Endgame.gui and check the name in the uppermost GuiControl definition (the name would be in the end parenthesis of a new statement, probably on the first line of the file).
#2
12/31/2006 (5:07 pm)
Thomas, thank you ever so much for your comment on this question! It really helps clarify the issue for me.

The same consideration would apply to a datablock as well, wouldn't it? That is, if a datablock statement were read in within the startGame function, its name would not immediately appear in the Datablock menu under the Create tab in the Level Editor. You would have to run the game once first, right?