Difference between revisions of "Joystick:getButtonCount"

m (moved love.joystick.getButtonCount to Joystick:getButtonCount: function has been moved)
(Move from love.joystick.getButtonCount)
Line 1: Line 1:
{{newin|[[0.9.0]]|090|type=function|text=It has been renamed from [[love.joystick.getNumButtons]]}}
+
{{newin|[[0.9.0]]|090|type=function|text=It has been moved from [[love.joystick.getNumButtons]]}}
 
 
 
Returns the number of buttons on the joystick.
 
Returns the number of buttons on the joystick.
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
buttons = love.joystick.getButtonCount( joystick )
+
buttons = Joystick:getButtonCount( )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|joystick|The joystick to be checked}}
+
None.
 
=== Returns ===
 
=== Returns ===
 
{{param|number|buttons|The number of buttons available}}
 
{{param|number|buttons|The number of buttons available}}
 
== See Also ==
 
== See Also ==
* [[parent::love.joystick]]
+
* [[parent::Joystick]]
 +
* [[Joystick:isDown]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Returns the number of buttons on the joystick.}}
 
{{#set:Description=Returns the number of buttons on the joystick.}}
 
== Other Languages ==
 
== Other Languages ==
{{i18n|love.joystick.getButtonCount}}
+
{{i18n|Joystick:getButtonCount}}

Revision as of 19:04, 26 August 2013

Available since LÖVE 0.9.0
It has been moved from love.joystick.getNumButtons.

Returns the number of buttons on the joystick.

Function

Synopsis

buttons = Joystick:getButtonCount( )

Arguments

None.

Returns

number buttons
The number of buttons available

See Also

Other Languages