PIXI Controls: Change virtual gamepad index
This commit is contained in:
parent
e544037d3c
commit
a673524ec3
2 changed files with 3 additions and 2 deletions
|
@ -4245,7 +4245,7 @@ var $plugins = [
|
|||
{
|
||||
"zIndex": 1488,
|
||||
"gamepadId": "Xbox Wireless Controller (STANDARD GAMEPAD Vendor: 045e Product: 02e0)",
|
||||
"gamepadIndex": 0,
|
||||
"gamepadIndex": 1,
|
||||
"buttonsScale": 1.2,
|
||||
"buttonsOpacity": 0.8
|
||||
}
|
||||
|
|
|
@ -324,7 +324,8 @@ VirtualGamepad.gamepad = {
|
|||
VirtualGamepad.replaceNavigator = function() {
|
||||
var gamepads = navigator.getGamepads();
|
||||
navigator.getGamepads = function() {
|
||||
gamepads[0] = VirtualGamepad.gamepad;
|
||||
var index = ONSControls.options.gamepadIndex;
|
||||
gamepads[index] = VirtualGamepad.gamepad;
|
||||
return gamepads;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue