Game Development Community

Gui Editor Prob TGE 1.5.2

by Infinitum3D · in Torque Game Engine · 08/01/2008 (12:28 pm) · 2 replies

I tried using the gui editor (F-10) in game to add a third HealthHud (adding a green to the existing red and blue).

If I do anything at all in the editor, even just select a guiBitmapCtrl, even if I don't change anything, when I save it, it gets corrupted.

I use File\Save gui and overwrite my existing gui, but then when I reload the game (after deleting my dso's) the mouse locks up in the game. Neither button works (either Fire or Camera Turning).

When I open the playGui.gui in a text editor and compare it to an uncorrupted copy of the original., the messed up one has the line

cansaveDynamicFields at the beginning of each "new" section. That's the only difference.

Even if I made no changes.

I have to do all my editing in a text editor, which is OK with me, but I thought you would want to know.

Oh, it only happens when I overwrite the existing playGui.gui, NOT if I save with a different name so maybe its because I'm editing or overwriting the gui that is being used at the time?

I guess its not really a bug after all. You just have to save it as something else, shut down, and rename it...

Nevermind. Thanks!

Tony

#1
08/16/2008 (12:48 pm)
Alternative suggestion:

Fire up your game but stay in the main menu or title screen if you have one. Don't invoke PlayGui, in other words. Hit F10 to pop the editor and switch to PlayGui. Edit and save as desired.

The problem is that the engine tends to not like the GUI editor redefining a GUI layout file while it's in use. So, as long as that specific layout's not in use you should be able to edit it safely.
#2
08/16/2008 (6:50 pm)
Thanks for the tip Tom. You are absolutely correct.

Tony