Game Development Community

How to change a cursor?

by Andrew H · in Torque Game Builder · 09/22/2011 (3:06 pm) · 4 replies

How exactly do I change the cursor? It starts automatically set to defaultCursor - how do I create my own cursor and use it? Oh, and I get I'll need to make a graphic file - just tell me how to get T2D to use my cursor(s).

#1
09/22/2011 (11:36 pm)
new GuiCursor(cursorName){  
   //hotspot is how many pixels into the image you want the actual cursor point to be.  
   hotSpot = "2 2";  
   bitmapName = "game/data/images/imageFile";  
};

Canvas.setCursor(cursorName);
#2
09/23/2011 (2:37 pm)
Clarify what you mean by 'how many pixels into the image', please.
#3
09/23/2011 (6:44 pm)
I believe he means from the top left of the image. So in this case the hotspot or clicking point of the cursor would be 2 pixels in and down from the top left of the image.
#4
09/23/2011 (7:15 pm)
Oh...Okay, then! Cool.