====== Custom Mouse Cursors ====== The ''Cursor'' property allows you set the type of hardware 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 {{ tutorials:display:hand-cursor.png |}} Alternatively, a very nifty feature is to provide your own image as the cursor (''png'', ''jpg'', ''bmp'', ''tga'' or ''webp'' are all supported). Great for games where a fancy cursor is needed, ie: {{ tutorials:display:amiga-cursor.png | }} [Display] Cursor = amiga-cursor.png By default, this will place the cursor's hotspot in the top left corner. You can move this hotspot by providing an optional vector, ie: [Display] cursor = amiga-cursor.png # (10, 10) {{ tutorials:display:custom-cursor-outside.png |}} 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 [[en:tutorials:config:guide_to_the_orx_console|Orx Console]]. Press the ~ key to open the console and type: Mouse.SetCursor crosshair {{ tutorials:display:cursor-orx-console.png |}} Finally, you can set a mouse cursor in code: orxMouse_SetCursor("amiga-cursor.png", orxNULL); This will set the cursor to the amiga arrow, 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("amiga-cursor.png", &hotspot); ===== Hiding the mouse cursor ===== If you don't want a cursor to display at all then you won't want to show it. You an use the ''ShowCursor'' in the ''Mouse'' section. See [[en:orx:config:settings_main:main#mouse_module|Mouse Config inputs]] for more details.