Called when a joystick button is pressed.
== Function ==
{{newin|[[0.9.0]]|090|type=variant}}
=== Synopsis ===
<source lang="lua">
love.joystickpressed( joystick, button )
</source>
=== Arguments ===
{{param|Joystick|joystick|The joystick object.}}
{{param|number|button|The button number.}}
=== Returns ===
Nothing.

== Examples ==
=== Use joystickpressed to map stimulate the jumping of a player ===
<source lang="lua">
function love.joystickpressed(joystick,button)
   player:jumping()
end

--inside playerClass
function player:jumping()
   if joyStick:isGamepadDown('a') then
        if self.jump then
	       self.speedY = self.jumpSpeed
            self.jump = false
    	end
    end
end
</source>

== Function ==
{{oldin|[[0.9.0]]|090|type=variant}}
=== Synopsis ===
<source lang="lua">
love.joystickpressed( joystick, button )
</source>
=== Arguments ===
{{param|number|joystick|The joystick number.}}
{{param|number|button|The button number.}}
=== Returns ===
Nothing.
== See Also ==
* [[parent::love]]
* [[love.joystickreleased]]
[[Category:Callbacks]]
{{#set:Description=Called when a joystick button is pressed.}}
{{#set:Subcategory=Joystick}}
{{#set:Since=000}}
== Other Languages ==
{{i18n|love.joystickpressed}}