Check if a mouse button has been pressed once
raylib.InitWindow 800, 600, "Mouse Button Pressed Demo" count = 0 while not raylib.WindowShouldClose if raylib.IsMouseButtonPressed(raylib.MOUSE_BUTTON_LEFT) then count = count + 1 raylib.BeginDrawing raylib.ClearBackground color.white raylib.DrawText "Left clicks: " + count, 10, 10, 20, color.black raylib.EndDrawing end while raylib.CloseWindow
There was an error while loading. Please reload this page.