summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core.c6
-rw-r--r--src/raylib.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 6ac24ded..e54c5559 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 490755e9..9d9fd8c5 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)