Game Development Community

Gui's

by Spencer Simonsen · in Technical Issues · 02/15/2007 (8:12 pm) · 4 replies

Could someone tell me the commands for manipulating a gui menu (for instance, setting the position, creating, deleting, etc.) through scripts?

#1
03/14/2007 (7:03 pm)
Try opening up a .gui file with Notepad. You can learn all the stuff you need from comparing that with what the GUI editor shows you.
#2
03/14/2007 (10:01 pm)
Yep, that will show you the essential fields for each control; you'll probably set most of these properties in a profile datablock ahead of time. Dissecting the .gui files in /client/ui and /common/ui would be a good way to start.

Edward Maurina has compiled an awesome primer for Torque, which he has graciously made available for download. Appendix C contains fields and functions associated with GUI elements.

That content (and more) can be found in his book, The Game Programmer's Guide To Torque, which I believe is available through the GG site. Definitely a worthwhile purchase.

Good luck!
#3
03/14/2007 (10:04 pm)
There's also the GUI Project, which is available as a resource -- can't remember the exact name off hand, but it's on TDN -- it's a fully working demo of most of the GUI elements in TGB, with commented code ...
#4
03/19/2007 (9:36 am)
Setting pos and extent:

GUINAME.resize(posx,posy,extx,exty);