Difference between revisions of "love.joystick.getJoysticks"

(Created page)
 
m
Line 21: Line 21:
 
</source>
 
</source>
 
== See Also ==
 
== See Also ==
 +
* [[Constructs::Joystick]]
 
* [[parent::love.joystick]]
 
* [[parent::love.joystick]]
 
* [[love.joystick.getJoystickCount]]
 
* [[love.joystick.getJoystickCount]]
* [[Constructs::Joystick]]
+
 
 
* [[love.joystickadded]]
 
* [[love.joystickadded]]
 
* [[love.joystickremoved]]
 
* [[love.joystickremoved]]

Revision as of 00:41, 27 August 2013

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Gets a list of connected Joysticks.

Function

Synopsis

joysticks = love.joystick.getJoysticks( )

Arguments

None.

Returns

table joysticks
The list of currently connected Joysticks.

Examples

function love.load()
    joysticks = love.joystick.getJoysticks()

    for i, joystick in ipairs(joysticks) do
        print(joystick:getName())
    end
end

See Also

Other Languages