GuiBitmapButtonCtrl onButtonDown type event.
by Peterjohn Griffiths · in Torque Game Builder · 06/26/2011 (6:02 am) · 1 replies
I have created a HUD with a Jump GuiBitmapButtonCtrl.
I have set the command to make my player Jump.
When the button is pressed down, nothing happens until you release it.
I need an onButtonDown event and an onButtonUp event for a Gui control like pressing a key down on the keyboard. The Gui doesn't need to be a button Ctrl, so long as it has the two events.
Anyone know how to do this?.
Many thanks.
I have set the command to make my player Jump.
When the button is pressed down, nothing happens until you release it.
I need an onButtonDown event and an onButtonUp event for a Gui control like pressing a key down on the keyboard. The Gui doesn't need to be a button Ctrl, so long as it has the two events.
Anyone know how to do this?.
Many thanks.
Torque Owner Peterjohn Griffiths
Default Studio Name
Because of this the functionality I require can't be done through the control.
A workaround is to place a GuiMouseCtrl over the button and have that process the onMouseDown and onMouseUp events instead.
Works well and will do for what I need.
I think it would be a good idea to enable these events in a future release of TGB in all Gui controls incase someone else needs them. Makes it more user friendly for a couple of lines of code.