Toggle Mouse On and Off
by Matt Huston · in Torque Game Engine · 10/04/2007 (2:09 am) · 1 replies
Does anyone have any code for turning your mouse on and off, I am working on a game that requires the player to use both FPS mode and then also use the mouse to select a GUI objects on the screen.
The following code does not work.
The following code does not work.
function toggleMouse(%val)
{
if(PlayGui.noCursor)
PlayGui.noCursor = false;
else
PlayGui.noCursor = true;
}
moveMap.bind( keyboard, m, toggleMouse);About the author
www.atomicbanzai.com
Employee Michael Perry
GarageGames
function toggleMouse() { if(Canvas.isCursorOn()) CursorOff(); else CursorOn(); }