-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
input/gamepads: added documentation, cleaned up y axis inversion for …
…flash on google chrome, added missing y axis inversion case for flash on windows standalone player
- Loading branch information
1 parent
4c4c89f
commit ea289b1
Showing
3 changed files
with
70 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package flixel.input.gamepad.id; | ||
|
||
import flixel.input.gamepad.FlxGamepad; | ||
import flixel.input.gamepad.FlxGamepadMapping.Manufacturer; | ||
|
||
/** | ||
* IDs for Xbox 360 controllers | ||
|
@@ -9,8 +10,23 @@ class XBox360ID | |
{ | ||
public static inline var SUPPORTS_MOTION = false; | ||
public static inline var SUPPORTS_POINTER = false; | ||
|
||
#if !flash | ||
public static inline function getFlipAxis(AxisID:Int, manufacturer:Manufacturer):Int { return 1; } | ||
#else | ||
This comment has been minimized.
Sorry, something went wrong.
Gama11
Member
|
||
public static function getFlipAxis(AxisID:Int, manufacturer:Manufacturer):Int | ||
{ | ||
if (manufacturer == GooglePepper || manufacturer == AdobeWindows) | ||
{ | ||
if (AxisID == LEFT_ANALOG_STICK.y || AxisID == RIGHT_ANALOG_STICK.y) | ||
{ | ||
return -1; | ||
} | ||
} | ||
return 1; | ||
} | ||
#end | ||
|
||
public static inline function getFlipAxis(AxisID:Int):Int { return 1; } | ||
public static function isAxisForMotion(ID:FlxGamepadInputID):Bool { return false; } | ||
|
||
#if flash | ||
|
If you want to add docs for these, do it like on FlxGamepadDeadZoneMode with javadoc comments (for completion and api docs, these // comments are usually ignored there).