Game Development Community

Click and Hold Buttons?

by Nicolai Dutka · in Torque Game Builder · 08/16/2007 (3:14 pm) · 4 replies

I am wanting to put in a few buttons that you "click and hold" to fill a meter. All I can find is a spot for a function call when pressed, but not one for when released. Any ideas?

#1
08/16/2007 (3:32 pm)
Turn on usemouseevents for your button, then you can implement the all the mouse callback functions.
#2
08/16/2007 (3:35 pm)
How do I turn on "usemouseevents"?
#3
08/16/2007 (3:55 pm)
You can do it in the GUI editor, by selecting your button then looking for it in the right side frame. Or you can add it into the .gui file by adding this line where your button is defined.
usemouseevents = "1";

This thread has a list of all the mouse callbacks you can utilize in script.
http://www.garagegames.com/mg/forums/result.thread.php?qt=28812
#4
08/16/2007 (4:01 pm)
OMG! I am sooo sorry, I am in the wrong forum! I am using TGE 1.5.2! I need this functionality in the Torque 3D GUI!