Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/raylib.h
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,7 @@ RLAPI bool IsCursorHidden(void); // Check if cu
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
RLAPI bool IsCursorOnScreen(void); // Check if cursor is on the screen
RLAPI bool IsCursorDisabled(void); // Check if cursor is disabled (locked)

// Drawing-related functions
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
Expand Down
6 changes: 6 additions & 0 deletions src/rcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,12 @@ bool IsCursorOnScreen(void)
return CORE.Input.Mouse.cursorOnScreen;
}

// Check if cursor is disabled (locked)
bool IsCursorDisabled(void)
{
return CORE.Input.Mouse.cursorLocked;
}

//----------------------------------------------------------------------------------
// Module Functions Definition: Screen Drawing
//----------------------------------------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions tools/rlparser/output/raylib_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -3590,6 +3590,11 @@
"description": "Check if cursor is on the screen",
"returnType": "bool"
},
{
"name": "IsCursorDisabled",
"description": "Check if cursor is disabled (locked)",
"returnType": "bool"
},
{
"name": "ClearBackground",
"description": "Set background color (framebuffer clear color)",
Expand Down
5 changes: 5 additions & 0 deletions tools/rlparser/output/raylib_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3467,6 +3467,11 @@ return {
description = "Check if cursor is on the screen",
returnType = "bool"
},
{
name = "IsCursorDisabled",
description = "Check if cursor is disabled (locked)",
returnType = "bool"
},
{
name = "ClearBackground",
description = "Set background color (framebuffer clear color)",
Expand Down
Loading
Loading