Love2D/LovePotion checking if pressed gamepad button

bebrilovich

Member
OP
Newcomer
Joined
Oct 14, 2023
Messages
11
Trophies
0
Age
23
XP
84
Country
Ukraine
how to check it? i tried to found on google but don't found(or i am not trying, idk)

edited : i found on google but when i test it in on windows app it work with my gamepad but when i use citra there is an error

here is a code

function love.load() image = love.graphics.newImage("da.png") player = image da = 200 x = 100 y = 100 local joysticks = love.Joystick.getJoysticks() joystick = joysticks[1] end function love.draw() --love.graphics.print('Hello World!', 0, 0) --love.graphics.applyTransform(transform) love.graphics.draw(player, x, y) end function love.update(dt) if joystick:isGamepadDown("dpleft") then x = x + (100 * dt) end end
 

Attachments

  • clipboard_image_43cb9c61f8822296.jpg
    clipboard_image_43cb9c61f8822296.jpg
    30.2 KB · Views: 22
Last edited by bebrilovich,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: I think Switch 2 will launch about Christmas this year lol