diff --git a/src/core.c b/src/core.c index 6ac24ded4..e54c55590 100644 --- a/src/core.c +++ b/src/core.c @@ -1318,6 +1318,12 @@ void DisableCursor(void) CORE.Input.Mouse.cursorHidden = true; } +// Check if cursor is on the current screen. +bool IsCursorOnScreen(void) +{ + return CORE.Input.Mouse.cursorOnScreen; +} + // Set background color (framebuffer clear color) void ClearBackground(Color color) { diff --git a/src/raylib.h b/src/raylib.h index 490755e9c..9d9fd8c56 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -903,6 +903,7 @@ RLAPI void HideCursor(void); // Hides curso RLAPI bool IsCursorHidden(void); // Check if cursor is not visible 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 current screen. // Drawing-related functions RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)