Joystick Button String Names?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
i_love_u
Prole
Posts: 28
Joined: Sat Nov 29, 2014 12:13 am

Joystick Button String Names?

Post by i_love_u » Mon Mar 02, 2015 8:13 pm

So, I am using the code:

Code: Select all

joystick:isGamepadDown("?") 
for input(s) for my Xbox controller, but I need the names of the buttons.

Any help would be greatly appreciated!

User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Joystick Button String Names?

Post by s-ol » Mon Mar 02, 2015 8:19 pm

Check the wiki, on the page for isGamepadDown (http://www.love2d.org/wiki/Joystick:isGamepadDown) it say that the button parameters are of type GamepadButton. That link leads here, where you can find a full list of all Joystick/Gamepad buttons.

L2/R2 are a third axis on most controllers.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests