Skip to content

raylib.IsMouseButtonReleased

JoeStrout edited this page Oct 17, 2026 · 3 revisions

Check if mouse button has been released once

Parameters

Parameter Default Value Note
button

Return value

Condition Return Value
(always) number

Notes

Example

raylib.InitWindow 800, 600, "Mouse Button Released Demo"
msg = "Click and release the left button"
while not raylib.WindowShouldClose
    if raylib.IsMouseButtonReleased(raylib.MOUSE_BUTTON_LEFT) then msg = "Left button released!"
    raylib.BeginDrawing
    raylib.ClearBackground color.white
    raylib.DrawText msg, 10, 10, 20, color.black
    raylib.EndDrawing
end while
raylib.CloseWindow

Clone this wiki locally