love.joystick.setGamepadMapping (한국어)
Available since LÖVE 0.9.0 |
This function is not supported in earlier versions. |
가상 게임패드 입력을 조이스틱 버튼, 축, 햇에 매핑합니다. For example, if this function is used with a GUID returned by a Dualshock 3 controller in OS X, the binding will affect Joystick:getGamepadAxis and Joystick:isGamepadDown for all Dualshock 3 controllers used with the game when run in OS X.
LÖVE includes built-in gamepad bindings for many common controllers. This function lets you change the bindings or add new ones for types of Joysticks which aren't recognized as gamepads by default.
The virtual gamepad buttons and axes are designed around the Xbox 360 controller layout.
함수
형식
success = love.joystick.setGamepadMapping( guid, button, inputtype, inputindex, hatdir )
매개변수
string (한국어) guid
- The OS-dependent GUID for the type of Joystick the binding will affect.
GamepadButton (한국어) button
- The virtual gamepad button to bind.
JoystickInputType (한국어) inputtype
- The type of input to bind the virtual gamepad button to.
number (한국어) inputindex
- The index of the axis, button, or hat to bind the virtual gamepad button to.
JoystickHat (한국어) hatdir (nil)
- The direction of the hat, if the virtual gamepad button will be bound to a hat. nil otherwise.
리턴값
boolean (한국어) success
- Whether the virtual gamepad button was successfully bound.
함수
형식
success = love.joystick.setGamepadMapping( guid, axis, inputtype, inputindex, hatdir )
매개변수
string (한국어) guid
- The OS-dependent GUID for the type of Joystick the binding will affect.
GamepadAxis (한국어) axis
- The virtual gamepad axis to bind.
JoystickInputType (한국어) inputtype
- The type of input to bind the virtual gamepad axis to.
number (한국어) inputindex
- The index of the axis, button, or hat to bind the virtual gamepad axis to.
JoystickHat (한국어) hatdir (nil)
- The direction of the hat, if the virtual gamepad axis will be bound to a hat. nil otherwise.
리턴값
boolean (한국어) success
- Whether the virtual gamepad axis was successfully bound.
알아 두기
The physical locations for the bound gamepad axes and buttons should correspond as closely as possible to the layout of a standard Xbox 360 controller.
같이 보기
- love.joystick (한국어)
- Joystick:getGUID (한국어)
- Joystick:isGamepad (한국어)
- Joystick:getGamepadMapping (한국어)
다른 언어
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