Game Development Community

Gui Button Callbacks

by Zeinad · in Torque Game Builder · 04/14/2009 (2:30 pm) · 1 replies

I am having a problem with the gui, I can't seem to get the onMouseDown and onMouseUp callbacks working with gui buttons. I have checked the box in the button's properties which is the only thing I have been finding when I look around the forums.

i have tried both:

function myButtonName::onMouseDown( %this, %modifier, %worldPos, %mouseClicks )
{
echo("mousedown");
}

function myGuiName::onMouseDown( %this, %modifier, %worldPos, %mouseClicks )
{
echo("mousedown");
}

#1
04/16/2009 (7:14 am)
I have found a temporary solution, which is to create a trigger box and put it over an image, and use the mouse callbacks for the trigger box. I don't consider this solution particularly awesome and would rather use an actual gui if possible, but have yet to get it working properly.