Difference between revisions of "cock.addJoystick"
m |
m |
||
Line 15: | Line 15: | ||
*[[cock.setJoystickDeadzone]] | *[[cock.setJoystickDeadzone]] | ||
*[[cock.reloadJoysticks]] | *[[cock.reloadJoysticks]] | ||
− | *[[Common Organization of Controls Kit | + | *[[Common Organization of Controls Kit Fields]] |
*[[parent::Common Organization of Controls Kit Manual]] | *[[parent::Common Organization of Controls Kit Manual]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 18:22, 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. Function cock.reloadJoysticks will happily override dummy joysticks with real ones.
See also
- cock.deleteJoystick
- cock.setJoystickDeadzone
- cock.reloadJoysticks
- Common Organization of Controls Kit Fields
- Common Organization of Controls Kit Manual
- Common Organization of Controls Kit