THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!
Toggle whether or not the cursor is shown.
int SDL_ShowCursor(int toggle);
toggle |
|
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.
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.
This function is available since SDL 2.0.0.
int main(int argc, char *argv[]) {
/* creates a blank cursor */
SDL_ShowCursor(SDL_DISABLE);/* ... */
return 0;
}
CategoryAPI, CategoryMouse, CategoryDraft