-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.IsCursorOnScreen
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Check if cursor is on the current screen
None.
| Condition | Return Value |
|---|---|
| (always) | number |
raylib.InitWindow 800, 600, "Cursor On Screen Demo"
while not raylib.WindowShouldClose
raylib.BeginDrawing
raylib.ClearBackground color.white
if raylib.IsCursorOnScreen then
raylib.DrawText "Cursor is on screen", 10, 10, 20, color.green
else
raylib.DrawText "Cursor is off screen", 10, 10, 20, color.red
end if
raylib.EndDrawing
end while
raylib.CloseWindow