This is new wiki software and old wiki content. It's a work in progress!
Here's the explanation.
Be gentle, report bugs, leave feedback on pages, or just edit them yourself! Thanks!

SDL Wiki

Draft

THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!

SDL_ShowCursor

Toggle whether or not the cursor is shown.

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 without changing it.

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.

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.

Code Examples

int main(int argc, char *argv[]) {
    /* creates a blank cursor */
    SDL_ShowCursor(SDL_DISABLE);
    /* ... */
    return 0;
}
SDL_CreateCursor
SDL_SetCursor

CategoryAPI, CategoryMouse, CategoryDraft


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.