Game Development Community

GUI Editor bug

by Drew -Gaiiden- Sikora · in Torque Game Builder · 03/03/2005 (1:51 am) · 13 replies

When I run the T2D exe with no mods (other than the default one) and load up the GUI editor, everything is fine until I try and toggle out of it. When I do that, the window stops refreshing, and the mouse cursor leaves a trail across the window until I toggle the GUI editor back on. I thought at first it was toggling out of the editor but just not refreshing the window - but the menu still holds GUI editor commands, so I can't quit and have to ctrl+alt+del to close T2D. It's weird because i can still toggle in and out of the other editors, it just brings me back to the GUI editor. This only happens too if I mess around with the editor, it always lets me toggle out if I don't change anything.

#1
03/03/2005 (2:53 am)
@Drew: I'm not seeing this. What do you mean when you say "T2D exe with no mods"?

You can always drop-down the console with the tilde "~" key and type "quit();".

- Melv.
#2
03/03/2005 (3:04 am)
The only problem like that I've seen is when I create a new GUI. I'm guessing it's something to do with the new GUI not having been loaded up properly. As soon as I quit the engine, and add the call to exec the new GUI, I can change it without problem.
#3
03/03/2005 (3:21 am)
@Philip: What's the problem exactly? When you create the new GUI, you need to tell the engine to load it with an EXEC call otherwise it doesn't know about it. This is much better than it just loaded all the GUI files it can find I guess.

- Melv.
#4
03/03/2005 (3:41 am)
If you open the GUI editor, and save the GUI with a new filename, then the screen goes a bit wonky with the problems that Drew described.

If you quit the engine, add the exec call for the new GUI and then look at it in the editor, it works fine.

As I said, I suspect it's something to do with having a GUI file open that hasn't been exec'd. It's not really a problem for me now though, as I've just got into the habit of copying the .gui file over, making some changes by hand, adding the exec call, and then looking at it in the GUI Editor.
#5
03/03/2005 (3:55 am)
I don't think you're seeing any bug here. When you see mouse trails, it means that you've not got any GUI selected.

When you come "out" of the GUI editor, it shows you the screen you were editing. For instance, select the GUI that provides the console (ConsoleDlg) and hit F10. Part of the screen leaves a mouse-trail because that part has no GUI in it and is transparent because it's a pop-up dialog style GUI.

You need so select the GUI you want such as "mainScreenGUI" before hitting F10 again.

I just created a new GUI, added a single button and hit F10. ONLY the button will render causing the mouse to leave trails. This is normal behavior. You didn't tell T2D to render anything other than the button. Essentially, the underlying control is typically a GuiControl which doesn't render anything.

Also, this is just the TGE console editor. There's no special T2D editor.

Cool?

- Melv.
#6
03/03/2005 (4:13 am)
Cool :) Got it. No background in GUI = mouse trails :)
#7
03/03/2005 (4:15 am)
I had the same problem years ago when I started using the GUI editor so I understand the confusion. I was convinced this was the effect you were seeing. :)

- Melv.
#8
03/03/2005 (11:43 am)
Ok I understand now too - thx Melv
#9
04/09/2005 (9:46 am)
Okay, I've been having this happen too. (I'm going through Matt's basic tutorial, Part 2.) I had this happen when I got too tired to continue, and decided to save mywork and exit to do some more work later.

If it's still seeing the GUI when we toggle out, and the trails are because the background is transparent, then how do we actually toggle out so that we can use the regular T2D menu commands to exit?

I hit [F10] after creating the GUI and it gives me mouse trails. It looks like it's still in the GUI editor - there is no change to the T2D menus. I do not have the normal "File" menu where I can choose to exit T2D. It still retains all of the appearance of the GUI editor, same menu, same commands; but I cannot effect anything. No menu command works, no button actuall works.

If I hit [F10] again, it goes back into the *real* GUI editor. Again, no visible change, still looks exactly the same, except no mouse trails and now all the menus work. I can actually manipulate the GUI, change it, etc.

If this is normal behavior, how do we get completely out of the GUI editor, back to the main menu to exit out?
#10
04/09/2005 (10:08 am)
If you select the GUI (in the editor) that you want (in your app it could be called anything).

In the stock T2D one, you can select the "mainScreenGui".

This confusion is caused because the GUI editor actually edits in-place which is good but can be confusing if you don't have a "get-out" one.

You can always drop the console down "~" and type "quit();". :)

- Melv.
#11
04/09/2005 (10:40 am)
Thanks. For some reason I can't do anything right now because I can't even seem to find the GUI that I saved. :P

So I need to make sure "mainScreenGUI" is selected in the middle bar before exiting the GUI editor then? That's good to know. Thanks!
#12
04/09/2005 (10:48 am)
A couple of extra pointers here...

Be careful because sometimes the editor defaults to "common/ui" when you go to save (don't ask me why). Also, the editor will save the file by default as the name of the root control. If you change this name when you save it, reload it and go to save again, it'll still default to the root-control name so if you just hit enter it'll save as that.

I always leave the name of the GUI-file as the suggested one (root-control name) to save this confusion. Also, check the default direct that comes up.

We'll be changing these NAFF load/save dialogs for something much more useful so just bear with us. :)

- Melv.
#13
05/21/2005 (7:52 am)
Just as an addendum - sorry this is so late - I thought I'd mention that part of my problem was functional. I'm used to running basic "windows" programs, where if there's a menu, it's usually there to support program functions. I assumed (you know what they say about ass-u-me!) that Torque's menus worked the same way.

For instance, if I click "File" from the main screen, I expect to be able to manipulate files, at any time.

My understanding is that Torque, doesn't really have a menu system like what we expect from a windows program. Rather, it has a sort of template that shows what can be done via the GUI editor, and there are a few commands that you can sort of hink around with if you want to use them. But since the menu is not a part of the program itself, but is a separate piece, the changes that you make in your game also affect the menu. It's not a static part of the program like you'd expect to find in say, Microsoft Word or something.

This fine distinction caused me much confusion. I couldn't figure out why common elements on the menu would suddenly disappear. It went a long way to my thinking that the T2D EA release was buggy. However, understanding now that the menus aren't a part of the program, but can be removed and edited as your game requires, has caused a lot of that frustration to go away. :)