Toggle Cursor
by Nancy Lee · in Technical Issues · 12/02/2008 (3:47 am) · 1 replies
Hi, i have been trying to get it work but couldnt...
I tried to add the following code in the default.bind.cs in client
function ToggleCursor(%val)
{
if(%val)
{
if( Canvas.isCursorOn() )
CursorOff();
else
CursorOn();
}
moveMap.bind( keyboard, m, ToggleCursor);
there is no change from my game at all.
Another problem is I have created dynamic field "noCursor = 1" in the PlayGui, now i can't even delete the dynamic field.
Could you please help me to make it work, I am frustrated about it.....
I tried to add the following code in the default.bind.cs in client
function ToggleCursor(%val)
{
if(%val)
{
if( Canvas.isCursorOn() )
CursorOff();
else
CursorOn();
}
moveMap.bind( keyboard, m, ToggleCursor);
there is no change from my game at all.
Another problem is I have created dynamic field "noCursor = 1" in the PlayGui, now i can't even delete the dynamic field.
Could you please help me to make it work, I am frustrated about it.....
About the author
Torque Owner Brian Wilson
Each press of the bound key toggles the state of the cursor:
function toggleCursor() { if(Canvas.isCursorOn()) Canvas.cursorOff(); else Canvas.cursorOn(); }The cursor toggles off when key pressed and returns when key is release:
function toggleCursor(%val) { if(%val) Canvas.cursorOff(); else Canvas.cursorOn(); }Make sure that your key binding is being defined before the actionmap is pushed.