Canvas.hideCursor bug?
by Doug Linley · in Torque Game Builder · 06/30/2006 (9:38 pm) · 4 replies
According to the tutorials and the documentation I've found, Canvas.hideCursor() can be used to hide the mouse cursor in game. It doesn't seem to be working for me, and at least one other person in the IRC channel confirmed that it wasn't working for them either. Is there a problem with this function? Perhaps I'm just not using it correctly.
#2
07/18/2006 (5:35 pm)
This actually isn't a bug. You're probably looking for Canvas.cursorOff(), or the global function hideCursor(). Any idea which tutorials misreferenced this? I'd like to get them fixed.
#3
07/21/2006 (10:56 am)
The Whack-A-Mole tutorial, part 5 uses Canvas.hideCursor().
#4
To clear up the confusion, here is the purpose of each of these functions:
Canvas.hideCursor/showCursor - disables rendering of the mouse cursor. This is useful for things like Whack-a-Mole where you still want the mouse to move (so the hammer can follow it), but don't want it to be seen.
Canvas.cursorOff/cursorOn - disables the mouse cursor completely, including hiding it. This would be used when you want to capture mouse movement through ActionMaps. The actual position of the mouse will be locked.
07/21/2006 (1:48 pm)
My bad, this actually is a bug. Canvas.hideCursor just hides the cursor whereas Canvas.cursorOff/On disables/enables the cursor.To clear up the confusion, here is the purpose of each of these functions:
Canvas.hideCursor/showCursor - disables rendering of the mouse cursor. This is useful for things like Whack-a-Mole where you still want the mouse to move (so the hammer can follow it), but don't want it to be seen.
Canvas.cursorOff/cursorOn - disables the mouse cursor completely, including hiding it. This would be used when you want to capture mouse movement through ActionMaps. The actual position of the mouse will be locked.
Torque 3D Owner Matthew Langley
Torque