|
Size: 1515
Comment: clarify input parameters can use the constants (which hav
|
Size: 1525
Comment: Moved and fixed comments in example.
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 25: | Line 25: |
| /* creates a blank cursor */ | |
| Line 26: | Line 27: |
| ... | /* ... */ |
| Line 29: | Line 30: |
| /* creates a blank cursor */ |
DRAFT |
SDL_ShowCursor
Use this function to toggle whether or not the cursor is shown.
Contents
Syntax
int SDL_ShowCursor(int toggle)
Function Parameters
toggle |
SDL_ENABLE to show the cursor, SDL_DISABLE to hide it, SDL_QUERY to query the current state |
Return Value
Returns SDL_ENABLE if the cursor is shown, or SDL_DISABLE if the cursor is hidden, or a negative error code on failure; call SDL_GetError() for more information.
Code Examples
int main(int argc, char** argv) {
/* creates a blank cursor */
SDL_ShowCursor(SDL_DISABLE);
/* ... */
return 0;
}
Remarks
The cursor starts off displayed but can be turned off. Passing SDL_ENABLE displays the cursor and passing SDL_DISABLE hides it.
The current state of the mouse cursor can be queried by passing SDL_QUERY; either SDL_DISABLE or SDL_ENABLE will be returned.
toggle may be any of the following:
-1 |
SDL_QUERY |
returns the current visibility of the cursor |
0 |
SDL_DISABLE |
makes the cursor hidden (also a return value as to the current state of the cursor) |
1 |
SDL_ENABLE |
makes the cursor visible (also a return value as to the current state of the cursor) |
