Check if a gamepad button is being pressed
raylib.InitWindow 800, 600, "Gamepad Button Down Demo" while not raylib.WindowShouldClose raylib.BeginDrawing raylib.ClearBackground color.white if raylib.IsGamepadButtonDown(0, raylib.GAMEPAD_BUTTON_LEFT_FACE_DOWN) then raylib.DrawText "A button held", 10, 10, 20, color.green end if raylib.EndDrawing end while raylib.CloseWindow
There was an error while loading. Please reload this page.