GUI Builder Losing GUIs
by Kevin O · in Torque Game Builder · 02/12/2007 (1:15 pm) · 5 replies
I scanned this whole category and did not see this issue (which scares me) so here we go:
Oftentimes, I will have a functioning game, like the Scroller Demo, and I'll go into the GUI Builder to try to add a splash screen or something. I'll make the beginnings of a GUI control, like GuiFadeinBitmapCtrl, link a .png file, it all looks good and save it (and yes I am aware of how you need to watch where it defaults to name and place the gui). Now if I use the pulldown to swap to the LevelBuilderGui and switch back to the game editor and then come back to the GUI Builder, my new gui is nowhere to be seen in the pulldown -- even though I can plainly see it in the GUI directory. Is there a way to reestablish the connection? I've had to rebuild GUIs a few times because of this.
Oftentimes, I will have a functioning game, like the Scroller Demo, and I'll go into the GUI Builder to try to add a splash screen or something. I'll make the beginnings of a GUI control, like GuiFadeinBitmapCtrl, link a .png file, it all looks good and save it (and yes I am aware of how you need to watch where it defaults to name and place the gui). Now if I use the pulldown to swap to the LevelBuilderGui and switch back to the game editor and then come back to the GUI Builder, my new gui is nowhere to be seen in the pulldown -- even though I can plainly see it in the GUI directory. Is there a way to reestablish the connection? I've had to rebuild GUIs a few times because of this.
About the author
#2
The thing to understand is, what leads to the entry in the GuiBuilder pulldown menu? It appears that statements like those appearing in mainScreen.gui, which instantiate a GuiControl, is one way. When you are working on a game and bring up Gui Editor and do File->New Gui..., you do effectively the same thing.
But if you create a new Gui and even save it, there is no assurance that it will be in TGB's memory at some future point in time, because doing Open Project (in Level Editor) relaunches the entire application (this is being done to ensure a clean environment for your work on your new project). It is then that having the proper exec() statement in your initializeProject() function (defined in main.cs) is crucial.
In order to become really clear on these types of issues, it is important to become familiar with the information in the console log (file ./console.log). As long as the application does not relaunch itself, this file will grow. But the file is wiped out when you lauch TGB. Not to speak of the wealth of information in the log.
02/13/2007 (4:31 pm)
Yes, this should be a Gui Builder Gotcha. I am accumulating a list of them, so thanks for another one.The thing to understand is, what leads to the entry in the GuiBuilder pulldown menu? It appears that statements like those appearing in mainScreen.gui, which instantiate a GuiControl, is one way. When you are working on a game and bring up Gui Editor and do File->New Gui..., you do effectively the same thing.
But if you create a new Gui and even save it, there is no assurance that it will be in TGB's memory at some future point in time, because doing Open Project (in Level Editor) relaunches the entire application (this is being done to ensure a clean environment for your work on your new project). It is then that having the proper exec() statement in your initializeProject() function (defined in main.cs) is crucial.
In order to become really clear on these types of issues, it is important to become familiar with the information in the console log (file ./console.log). As long as the application does not relaunch itself, this file will grow. But the file is wiped out when you lauch TGB. Not to speak of the wealth of information in the log.
#3
One of the big ones is the path that is selected as "root path" for you to save them, making them non-intuitive to find later.
02/14/2007 (10:29 am)
In my opinion there are some subtle workflow issues with using GUI's in TGB, and I'm bringing them to the attention of the dev team.One of the big ones is the path that is selected as "root path" for you to save them, making them non-intuitive to find later.
#4
I also think that the GUI Builder should 'auto-exec' any Saved GUI's, or have some sort of a 'You are about to leave the GUI Builder, do you want to exec the previously saved GUI's" pop-up ...
A nice big "DON'T FORGET TO EXEC YOUR GUI'S" in the middle of the screen while your designing them would be "fool proof" ... *cackle and giggle*
02/14/2007 (10:39 am)
The fact that the GUI Builder only remembers the path of the project loaded 'first' (if you change your project in the middle of running Level Builder, GUI builder thinks the first projects path is 'correct') is kind of funny ... I also think that the GUI Builder should 'auto-exec' any Saved GUI's, or have some sort of a 'You are about to leave the GUI Builder, do you want to exec the previously saved GUI's" pop-up ...
A nice big "DON'T FORGET TO EXEC YOUR GUI'S" in the middle of the screen while your designing them would be "fool proof" ... *cackle and giggle*
#5
02/14/2007 (2:11 pm)
This is all a great help. Thanks, guys. This will really cut down on the hair-pulling.
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft
The GUI editor does not scan the folders, it just lists the exec-ed GUIs there (most are base ones that are exec-ed whenever the editor enabled game is started)