Difference between revisions of "love.joystick"
m (Add newin) |
|||
(9 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{newin|[[0.5.0]]|050|type=module}} | |
− | Provides an interface to | + | Provides an interface to connected joysticks. |
+ | == Types == | ||
+ | {{#ask: [[Category:Types]] [[parent::love.joystick]] [[Concept:Current]] | ||
+ | | headers=hide | ||
+ | | format=template | ||
+ | | template=ListingFields | ||
+ | | introtemplate=ListingIntro | ||
+ | | outrotemplate=ListingOutro | ||
+ | | ?Description | ||
+ | | ?PrettySince | ||
+ | | ?PrettyRemoved | ||
+ | }} | ||
== Functions == | == Functions == | ||
− | {{#ask: [[Category:Functions]] [[parent::love.joystick]] | + | {{#ask: [[Category:Functions]] [[parent::love.joystick]] [[Concept:Current]] |
| headers=hide | | headers=hide | ||
+ | | format=template | ||
+ | | template=ListingFields | ||
+ | | introtemplate=ListingIntro | ||
+ | | outrotemplate=ListingOutro | ||
| ?Description | | ?Description | ||
+ | | ?PrettySince | ||
+ | | ?PrettyRemoved | ||
}} | }} | ||
== Enums == | == Enums == | ||
− | {{#ask: [[Category:Enums]] [[parent::love.joystick]] | + | {{#ask: [[Category:Enums]] [[parent::love.joystick]] [[Concept:Current]] |
| headers=hide | | headers=hide | ||
+ | | format=template | ||
+ | | template=ListingFields | ||
+ | | introtemplate=ListingIntro | ||
+ | | outrotemplate=ListingOutro | ||
| ?Description | | ?Description | ||
+ | | ?PrettySince | ||
+ | | ?PrettyRemoved | ||
}} | }} | ||
− | |||
− | |||
== See Also == | == See Also == | ||
* [[parent::love]] | * [[parent::love]] | ||
+ | * [[love.gamepadpressed]] | ||
+ | * [[love.gamepadreleased]] | ||
+ | * [[love.joystickpressed]] | ||
+ | * [[love.joystickreleased]] | ||
+ | * [[love.joystickadded]] | ||
+ | * [[love.joystickremoved]] | ||
+ | |||
+ | [[Category:Modules]] | ||
+ | {{#set:Description=Provides an interface to connected joysticks.}} | ||
+ | |||
+ | == Other Languages == | ||
+ | {{i18n|love.joystick}} |
Latest revision as of 12:18, 15 December 2018
Available since LÖVE 0.5.0 |
This module is not supported in earlier versions. |
Provides an interface to connected joysticks.
Contents
Types
Joystick | Represents a physical joystick. | ![]() |
Functions
love.joystick.close | Closes a joystick. | ![]() |
![]() |
love.joystick.getAxes | Returns the position of each axis. | ![]() |
![]() |
love.joystick.getAxis | Returns the direction of the axis. | ![]() |
![]() |
love.joystick.getBall | Returns the change in ball position. | ![]() |
![]() |
love.joystick.getGamepadMappingString | Gets the full gamepad mapping string of the Joysticks which have the given GUID, or nil if the GUID isn't recognized as a gamepad. | ![]() |
|
love.joystick.getHat | Returns the direction of a hat. | ![]() |
![]() |
love.joystick.getJoystickCount | Gets the number of connected joysticks. | ![]() |
|
love.joystick.getJoysticks | Gets a list of connected Joysticks. | ![]() |
|
love.joystick.getName | Returns the name of a joystick. | ![]() |
![]() |
love.joystick.getNumAxes | Returns the number of axes on the joystick. | ![]() |
![]() |
love.joystick.getNumBalls | Returns the number of balls on the joystick. | ![]() |
![]() |
love.joystick.getNumButtons | Returns the number of buttons on the joystick. | ![]() |
![]() |
love.joystick.getNumHats | Returns the number of hats on the joystick. | ![]() |
![]() |
love.joystick.getNumJoysticks | Returns how many joysticks are available. | ![]() |
![]() |
love.joystick.isDown | Checks if a button on a joystick is pressed. | ![]() |
![]() |
love.joystick.isOpen | Checks if the joystick is open. | ![]() |
![]() |
love.joystick.loadGamepadMappings | Loads a gamepad mappings string or file created with love.joystick.saveGamepadMappings. | ![]() |
|
love.joystick.open | Opens up a joystick to be used. | ![]() |
![]() |
love.joystick.saveGamepadMappings | Saves the virtual gamepad mappings of all recently-used Joysticks that are recognized as gamepads. | ![]() |
|
love.joystick.setGamepadMapping | Binds a virtual gamepad input to a button, axis or hat. | ![]() |
Enums
GamepadAxis | Virtual gamepad axes. | ![]() |
|
GamepadButton | Virtual gamepad buttons. | ![]() |
|
JoystickHat | Joystick hat positions. | ![]() |
|
JoystickInputType | Types of Joystick inputs. | ![]() |
See Also
- love
- love.gamepadpressed
- love.gamepadreleased
- love.joystickpressed
- love.joystickreleased
- love.joystickadded
- love.joystickremoved
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info