GUI Buttons are onMouseUp! Can i make it onMouseDown?
by Red Ring · in Torque Game Engine · 10/11/2011 (3:06 am) · 1 replies
I have this problem with the GUI Buttons.
GUI buttons act as a "onMouseUp". I'd like it to act as a "onMouseDown" so when it is pushed the function is immediately activated. Can anyone help me on this matter? Timing is crucial on the game I'm making.
GUI buttons act as a "onMouseUp". I'd like it to act as a "onMouseDown" so when it is pushed the function is immediately activated. Can anyone help me on this matter? Timing is crucial on the game I'm making.
About the author
Torque Owner Jeff Yaskus
jy games
there is a callback for ::onMouseUp() and ::onMouseDown() which can be defined.
in other words, I have a gui which lets the player choose a mission.
... new GuiButtonCtrl(ChooseLevelDlgGoBtn) { ...And at the bottom of the GUI file, (2) functions defined;
function ChooseLevelDlgGoBtn::onMouseUp( %this ) { echo(">> ChooseLevelDlgGoBtn::onMouseUp <<"); } function ChooseLevelDlgGoBtn::onMouseDown( %this ) { echo(">> ChooseLevelDlgGoBtn::onMouseDown <<"); }... maybe that will help.