Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2013-10-30 21:42:14
Size: 1474
Comment: Added page for SDL_CreateSystemCursor( ) using content from headers.
Revision 2 as of 2014-01-22 01:59:21
Size: 1652
Editor: norbert
Comment: Mentioned all valid ids and added a simple code example.
Deletions are marked like this. Additions are marked like this.
Line 25: Line 25:
Valid ids are:
 * SDL_SYSTEM_CURSOR_ARROW
 * SDL_SYSTEM_CURSOR_IBEAM
 * SDL_SYSTEM_CURSOR_WAIT
 * SDL_SYSTEM_CURSOR_CROSSHAIR
 * SDL_SYSTEM_CURSOR_WAITARROW
 * SDL_SYSTEM_CURSOR_SIZENWSE
 * SDL_SYSTEM_CURSOR_SIZENESW
 * SDL_SYSTEM_CURSOR_SIZEWE
 * SDL_SYSTEM_CURSOR_SIZENS
 * SDL_SYSTEM_CURSOR_SIZEALL
 * SDL_SYSTEM_CURSOR_NO
 * SDL_SYSTEM_CURSOR_HAND
Line 32: Line 45:
You can add your code example here SDL_Cursor* cursor;
cursor = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_HAND);
SDL_SetCursor(cursor);
Line 34: Line 49:

##Leave this section as-is unless you have a code example to put in. In that case, replace You can add your code example here with your code example following the Style Guide instructions. Leave the rest of the markup alone and delete this comment.

DRAFT

SDL_CreateSystemCursor

Use this function to create a system cursor.

Syntax

SDL_Cursor* SDL_CreateSystemCursor(SDL_SystemCursor id)

Function Parameters

id

a system cursor enum value

Valid ids are:

  • SDL_SYSTEM_CURSOR_ARROW
  • SDL_SYSTEM_CURSOR_IBEAM
  • SDL_SYSTEM_CURSOR_WAIT
  • SDL_SYSTEM_CURSOR_CROSSHAIR
  • SDL_SYSTEM_CURSOR_WAITARROW
  • SDL_SYSTEM_CURSOR_SIZENWSE
  • SDL_SYSTEM_CURSOR_SIZENESW
  • SDL_SYSTEM_CURSOR_SIZEWE
  • SDL_SYSTEM_CURSOR_SIZENS
  • SDL_SYSTEM_CURSOR_SIZEALL
  • SDL_SYSTEM_CURSOR_NO
  • SDL_SYSTEM_CURSOR_HAND

Return Value

Returns a cursor on success or NULL on failure; call SDL_GetError() for more information.

Code Examples

SDL_Cursor* cursor;
cursor = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_HAND);
SDL_SetCursor(cursor);

Remarks

You can add useful comments here

Version

This function is available since SDL 2.0.0.


CategoryAPI, CategoryMouse

None: SDL_CreateSystemCursor (last edited 2016-04-15 21:50:30 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit