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
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
#2
-Ron
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
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
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 filefor 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
There are a few other code snipits and tutorials on GUIs
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=1842
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
Torque 3D Owner Bruce Wallace