JoystickButton.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package com.jme3.input;
  2. import com.jme3.input.controls.JoyAxisTrigger;
  3. import com.jme3.input.controls.JoyButtonTrigger;
  4. /**
  5. * Represents a single button of a Joystick.
  6. *
  7. * @author Paul Speed
  8. */
  9. public interface JoystickButton {
  10. public static final String BUTTON_0 = "0";
  11. public static final String BUTTON_1 = "1";
  12. public static final String BUTTON_2 = "2";
  13. public static final String BUTTON_3 = "3";
  14. public static final String BUTTON_4 = "4";
  15. public static final String BUTTON_5 = "5";
  16. public static final String BUTTON_6 = "6";
  17. public static final String BUTTON_7 = "7";
  18. public static final String BUTTON_8 = "8";
  19. public static final String BUTTON_9 = "9";
  20. public static final String BUTTON_10 = "10";
  21. public static final String BUTTON_11 = "11";
  22. /**
  23. * Assign the mapping name to receive events from the given button index
  24. * on the joystick.
  25. *
  26. * @param mappingName The mapping to receive joystick button events.
  27. */
  28. public void assignButton(String mappingName);
  29. /**
  30. * Returns the joystick to which this axis object belongs.
  31. */
  32. public Joystick getJoystick();
  33. /**
  34. * Returns the name of this joystick.
  35. *
  36. * @return the name of this joystick.
  37. */
  38. public String getName();
  39. /**
  40. * Returns the logical identifier of this joystick axis.
  41. *
  42. * @return the logical identifier of this joystick.
  43. */
  44. public String getLogicalId();
  45. /**
  46. * Returns the unique buttonId of this joystick axis within a given
  47. * InputManager context.
  48. *
  49. * @return the buttonId of this joystick axis.
  50. */
  51. public int getButtonId();
  52. }