Guest User

Untitled

a guest
Feb 24th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. /**
  2. * Mapping to use a PS4 gamepad with `Gamepad`.
  3. * Work in progress. Not sure if this is accurate cross-platform.
  4. */
  5. class PS4Gamepad
  6. {
  7. public static inline var TRIANGLE_BUTTON:Int = 3;
  8. public static inline var CIRCLE_BUTTON:Int = 1;
  9. public static inline var X_BUTTON:Int = 0;
  10. public static inline var SQUARE_BUTTON:Int = 2;
  11.  
  12. public static inline var L1_BUTTON:Int = 9;
  13. public static inline var R1_BUTTON:Int = 10;
  14. public static inline var SELECT_BUTTON:Int = 4;
  15. public static inline var START_BUTTON:Int = 6;
  16. public static inline var PS_BUTTON:Int = 5;
  17. public static inline var LEFT_ANALOGUE_BUTTON:Int = 7;
  18. public static inline var RIGHT_ANALOGUE_BUTTON:Int = 8;
  19. public static inline var DPAD_UP:Int = 11;
  20. public static inline var DPAD_DOWN:Int = 12;
  21. public static inline var DPAD_LEFT:Int = 13;
  22. public static inline var DPAD_RIGHT:Int = 14;
  23.  
  24. public static inline var LEFT_ANALOGUE_X:Int = 0;
  25. public static inline var LEFT_ANALOGUE_Y:Int = 1;
  26. public static inline var RIGHT_ANALOGUE_X:Int = 2;
  27. public static inline var RIGHT_ANALOGUE_Y:Int = 3;
  28. public static inline var L2_PRESSURE:Int = 4;
  29. public static inline var R2_PRESSURE:Int = 5;
  30. }
Add Comment
Please, Sign In to add comment