-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.IsWindowFocused
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Check if window has the focus
None.
| Condition | Return Value |
|---|---|
| (always) | number |
raylib.InitWindow 800, 600, "Window Focused Demo"
while not raylib.WindowShouldClose
raylib.BeginDrawing
raylib.ClearBackground color.white
if raylib.IsWindowFocused then
raylib.DrawText "Window has focus", 10, 10, 20, color.green
else
raylib.DrawText "Window lost focus", 10, 10, 20, color.gray
end if
raylib.EndDrawing
end while
raylib.CloseWindow