Game Development Community

GUI assistance please

by Ron Yacketta · in Torque Game Engine · 02/20/2002 (1:24 pm) · 4 replies

Folks,
very new to this (see previous thread)
what would it take to display a menu to
the client HUD where s/he can then use the mouse
to select certain options? The option selected then
would fire a trigger to complete a task

Regards
Ron

#1
02/20/2002 (2:33 pm)
press F10 inside the demo to get to the hud editor, and look through the Gui files of a hud that is similar to what you want and see how it works. I'm not quite sure what you are looking for but the .gui files and matching scripts in /client/ui and /client/scripts have script examples and in the source check out the /game/fps for or /gui.
#2
02/20/2002 (2:35 pm)
basicly looking to toss up a menu once th player is in game, to do things like select team/class/weapon etc.. etc..

-Ron
#3
02/20/2002 (2:50 pm)
yes, just use the gui editor (f10) and create a new gui element, for example mydialog... look on other dialogs for examples, you can then add buttons and make them call scripts functions on your gui script file
for example for gui file:
fps/client/ui/mydialog.gui
you would add a script
fps/client/scripts/mydialog.cs

you would then have to add to fps/client/init.cs 2 new exec lines like:

exec ("./ui/mydialog.gui");
exec ("./scripts/mydialog.cs");

you can then define a function myfunction() in mydialog.cs and then just assign the command on a button to run myfunction();
Hope that helps a bit at least
#4
02/20/2002 (2:51 pm)
This is a basic tutorial that Tim wrote a while ago, It has the basics of creating a gui.

There are a few other code snipits and tutorials on GUIs


www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=1842