Game Development Community

How to get the current Cursor from Canvas

by Stanley D Chatman · in Torque Game Builder · 02/21/2008 (12:34 am) · 1 replies

Does anyone know of a way to get the current cursor from the Canvas object. I know and use the setCursor function but I could not find an equivalent getCursor.

I am trying to do the following.

%currentCursor = Canvas.getCursor();
Canvas.setCursor(myCustomCursor);
//Do Something Here
Canvas.setCursor(%currentCursor);

#1
12/21/2012 (7:19 pm)
Yeah it looks like there is no Canvas.getCursor() or anything like it but what you could do is use a global variable to keep track of what cursor has been set and when. That way you can still accomplish what you want even if the ability to read what the current cursor actually is isn't an option.