Difference between revisions of "cock.addJoystick"
(Created page with "Adds new joystick to the object by given joystick number. == Synopsis == === Function === <source lang="Lua">joystick = cock.addJoystick ( self, number )</source> === Arguments =...") |
(→Synopsis) |
||
Line 8: | Line 8: | ||
=== Returns === | === Returns === | ||
{{param|number|joystick|Internal joystick number.}} | {{param|number|joystick|Internal joystick number.}} | ||
+ | == Remarks == | ||
+ | If function fails to find specified joystick, it will create ''a dummy joystick''. It will represent virtual non-functional joystick. It will accept all joystick operaitons, but will not carry out any of them. Dummy joysticks do not yield any output. | ||
+ | |||
==See also== | ==See also== | ||
*[[cock.deleteJoystick]] | *[[cock.deleteJoystick]] |
Revision as of 17:24, 1 September 2013
Adds new joystick to the object by given joystick number.
Synopsis
Function
joystick = cock.addJoystick ( self, number )
Arguments
table self
- An object to use.
number number
- Optional. LÖVE joystick number to hook up. Will use 1 if not provided.
Returns
number joystick
- Internal joystick number.
Remarks
If function fails to find specified joystick, it will create a dummy joystick. It will represent virtual non-functional joystick. It will accept all joystick operaitons, but will not carry out any of them. Dummy joysticks do not yield any output.
See also
- cock.deleteJoystick
- cock.setJoystickDeadzone
- cock.reloadJoysticks
- Common Organization of Controls Kit Manual
- Common Organization of Controls Kit