mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-15 15:58:14 +00:00
Add functions to disable and enable cursor
This commit is contained in:
18
src/core.c
18
src/core.c
@@ -1097,6 +1097,24 @@ void ShowCursor()
|
||||
cursorHidden = false;
|
||||
}
|
||||
|
||||
// Disable mouse cursor
|
||||
void DisableCursor()
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
|
||||
#endif
|
||||
cursorHidden = true;
|
||||
}
|
||||
|
||||
// Enable mouse cursor
|
||||
void EnableCursor()
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||
#endif
|
||||
cursorHidden = false;
|
||||
}
|
||||
|
||||
// Check if mouse cursor is hidden
|
||||
bool IsCursorHidden()
|
||||
{
|
||||
|
Reference in New Issue
Block a user