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/08/28 04:00 (7 years ago)] – sausage | en:tutorials:display:custom_mouse_cursor [2021/06/26 06:26 (4 years ago)] (current) – sausage | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Custom Mouse Cursors ====== | ====== Custom Mouse Cursors ====== | ||
- | <WRAP center round info 90%> | + | The '' |
- | This feature will be released in September 2018. | + | |
- | </ | + | |
- | + | ||
- | The '' | + | |
< | < | ||
Line 12: | Line 8: | ||
</ | </ | ||
- | {{ :en:tutorials: | + | {{ tutorials: |
- | Alternatively, | + | Alternatively, |
- | {{ :tutorials: | + | {{ tutorials:display: |
<code ini> | <code ini> | ||
Line 23: | 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 53: | 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 '' |