Game Development Community

Torque game engine GUI

by Skye T · in Torque 3D Professional · 02/11/2016 (6:31 am) · 3 replies

I'm really new to TGE and keep having problems with the GUI menu and player selection. How do I make a GUI menu and then after clicking a button it goes to another GUI where I could then select male / female which I have both the player models, but I have no idea how I am going to link that. Please help

About the author


#1
02/12/2016 (6:45 am)
You generally would move between gui controls via the GuiCanvas push/pop methods.

So you'd do Canvas.pushDialog("MyAwesomeGui");

And if you wanted to 'go back' from that one, you'd do Canvas.popDialog();

So to utilize this, you'd, say, have your main menu control, and then have your button you'd want to make it so when you click on it, it takes you to MyAwesomeGui.

In the editor, you can select the button, and then find the 'command' field in the inspector. This is script that's executed when the button is pressed.

You'd then put in your 'Canvas.pushDialog("MyAwesomeGui");' into the command field, and then save the main mneu gui.

With that, it should push your gui when you click the button.

(Also, just as a heads up, we have a newer forum at forums.torque3d.org that's running on newer forum software. Feel free to check it out)
#2
02/12/2016 (11:29 pm)
Thank you. I tried, but after I pressed the button, "pushDialog():Invalid control: SelectionGui"
Do i have to write some codes in the .cs file?
#3
02/16/2016 (12:54 pm)
Hi Skye T.
Dont get Excited , Im not really very good this stuff , I dont use T3D , I use TGE demo v1 , and have trouble with basic GUI stuff , etc etc etc , So ,
In TGE the GUI CS files are executed in a Client Initialization File like , client init or client/init or client/client . Check the date/time on the DSO which executes the GUI and make sure its current , sometimes it doesnt recompile the CS file . If its not current , as to the time of your previous changes , then , back up the old DSO in a safe folder and remove the old DSO from the original location and try again .
Perhaps youre beyond this stage and the advise is insignificant , If not then have a look at the slashscreen CS and menuScreen CS files the names might be a little different but you can probably find them in your client interfaces or whatever .:). Have a nice day .