Skip to content

raylib.IsGestureDetected

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Check if a gesture have been detected

Parameters

Parameter Default Value Note
gesture

Return value

Condition Return Value
(always) number

Notes

Example

raylib.InitWindow 800, 600, "Gesture Demo"
raylib.SetGesturesEnabled raylib.GESTURE_TAP
while not raylib.WindowShouldClose
    raylib.BeginDrawing
    raylib.ClearBackground color.white
    if raylib.IsGestureDetected(raylib.GESTURE_TAP) then
        raylib.DrawText "Tap detected!", 10, 10, 20, color.blue
    else
        raylib.DrawText "Tap the screen", 10, 10, 20, color.black
    end if
    raylib.EndDrawing
end while
raylib.CloseWindow

Clone this wiki locally