This is an old revision of the document!
The Cursor
property allows you set the type of mouse cursor image that is used when over the active window, or game. There are several standard ones built-in provided by the OS: arrow
, ibeam
, crosshair
, hand,
hresize,
vresize and
default''.
[Display] Cursor = hand
Alternatively, a very nifty feature is to provide your own png image as the cursor. Great for games where a fancy cursor is needed, ie:
[Display] Cursor = amiga-cursor.png
By default, this will place the cursor in the top left hand corner. You can move this hotspot by providing an optional vector, ie:
[Display] cursor = amiga-cursor.png # (10, 10, 0)
And like a normal cursor, it will hang outside the bounds of the window when you are the right or bottom extremes. Very nice.
You can change cursors using the Orx Console. Press the ~ key to open the console and type:
Mouse.SetCursor crosshair
Finally, you can set a mouse cursor in code:
orxMouse_SetCursor("hresize", orxNULL);
This will set the cursor to a hand, and keep the default hotspot by using orxNULL. Change the hotspot position using a vector like:
orxVECTOR hotspot = orxVECTOR_0; hotspot.fX = 10; hotspot.fY = 10; orxMouse_SetCursor("hresize", &hotspot);