Game Development Community

is there a onDown event for buttons?

by 2dGamer · in Torque 2D Beginner · 02/08/2014 (7:35 am) · 4 replies

From what I can find there is only only "onSelect" & "onClick".

#1
02/08/2014 (10:46 am)
<edit>
Just add it - copy onMouseUp().

Or use a guiMouseEventCtrl and give it the button profile....
#2
02/08/2014 (12:22 pm)
it would need to be while the button is being held down so it would just repeat something....
#3
02/09/2014 (12:12 am)
These 4 all work:

function InputManager::onTouchMoved(%this, %touchID, %worldPosition)

function InputManager::onTouchDown(%this, %touchId, %worldposition)

function InputManager::onTouchUp(%this, %touchId, %worldposition)

function InputManager::onTouchDragged(%this, %touchId, %worldposition)
#4
02/09/2014 (7:48 am)
Yeah, for scene objects.