This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:tutorials:display:custom_mouse_cursor [2018/09/10 13:26 (7 years ago)] – iarwain | en:tutorials:display:custom_mouse_cursor [2025/09/30 17:26 (4 weeks ago)] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Custom Mouse Cursors ====== | ====== Custom Mouse Cursors ====== | ||
| - | The '' | + | The '' |
| < | < | ||
| Line 8: | Line 8: | ||
| </ | </ | ||
| - | {{ :en:tutorials: | + | {{ tutorials: |
| - | Alternatively, | + | Alternatively, |
| - | {{ :tutorials: | + | {{ tutorials:display: |
| <code ini> | <code ini> | ||
| Line 19: | Line 19: | ||
| </ | </ | ||
| - | By default, this will place the cursor in the top left hand corner. You can move this hotspot by providing an optional vector, ie: | + | By default, this will place the cursor's hotspot |
| <code ini> | <code ini> | ||
| [Display] | [Display] | ||
| - | cursor = amiga-cursor.png # (10, 10, 0) | + | cursor = amiga-cursor.png # (10, 10) |
| </ | </ | ||
| - | {{ :en:tutorials: | + | {{ tutorials: |
| And like a normal cursor, it will hang outside the bounds of the window when you are the right or bottom extremes. Very nice. | 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: | + | You can change cursors using the [[en: |
| Mouse.SetCursor crosshair | Mouse.SetCursor crosshair | ||
| - | {{ :en:tutorials: | + | {{ tutorials: |
| Finally, you can set a mouse cursor in code: | Finally, you can set a mouse cursor in code: | ||
| <code c> | <code c> | ||
| - | orxMouse_SetCursor(" | + | orxMouse_SetCursor(" |
| </ | </ | ||
| - | This will set the cursor to a hand, and keep the default hotspot by using orxNULL. Change the hotspot position using a vector like: | + | 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: |
| <code c> | <code c> | ||
| Line 49: | Line 49: | ||
| hotspot.fY = 10; | hotspot.fY = 10; | ||
| - | orxMouse_SetCursor(" | + | orxMouse_SetCursor(" |
| </ | </ | ||
| + | ===== 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 '' | ||