Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CommonUsages.cs 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. using UnityEngine.InputSystem.Utilities;
  2. namespace UnityEngine.InputSystem
  3. {
  4. /// <summary>
  5. /// A collection of common usage string values as reported by <see cref="InputControl.usages"/>.
  6. /// </summary>
  7. public static class CommonUsages
  8. {
  9. /// <summary>
  10. /// Primary 2D motion control.
  11. /// </summary>
  12. /// <remarks>
  13. /// Example: Left stick on a gamepad.
  14. /// </remarks>
  15. public static readonly InternedString Primary2DMotion = new InternedString("Primary2DMotion");
  16. /// <summary>
  17. /// Secondary 2D motion control.
  18. /// </summary>
  19. /// <remarks>
  20. /// Example: Right stick on a gamepad.
  21. /// </remarks>
  22. public static readonly InternedString Secondary2DMotion = new InternedString("Secondary2DMotion");
  23. /// <summary>
  24. /// The primary action control on any input device, such as a gamepad, mouse, or keyboard.
  25. /// </summary>
  26. /// <remarks>
  27. /// Example: Primary mouse button (left button on right-handed configuration, right button on left-handed configuration),
  28. /// south-button on a gamepad.
  29. /// </remarks>
  30. public static readonly InternedString PrimaryAction = new InternedString("PrimaryAction");
  31. /// <summary>
  32. /// Secondary action control on any input device, such as a gamepad, mouse, or keyboard.
  33. /// </summary>
  34. /// <remarks>
  35. /// Example: Secondary mouse button (right button on right-handed configuration, left button on left-handed configuration),
  36. /// east-button on a gamepad.
  37. /// </remarks>
  38. public static readonly InternedString SecondaryAction = new InternedString("SecondaryAction");
  39. /// <summary>
  40. /// The primary trigger control on input devices with triggers.
  41. /// </summary>
  42. /// <remarks>
  43. /// Example: Right trigger-button on a gamepad.
  44. /// </remarks>
  45. public static readonly InternedString PrimaryTrigger = new InternedString("PrimaryTrigger");
  46. /// <summary>
  47. /// The secondary trigger control on input devices with triggers.
  48. /// </summary>
  49. /// <remarks>
  50. /// Example: Left trigger-button on a gamepad.
  51. /// </remarks>
  52. public static readonly InternedString SecondaryTrigger = new InternedString("SecondaryTrigger");
  53. /// <summary>
  54. /// A modifier action control that modifies usage of other controls.
  55. /// </summary>
  56. /// <remarks>
  57. /// Example: Keyboard modifier keys like CTRL, SHIFT, ALT, OPTION, etc.
  58. /// </remarks>
  59. public static readonly InternedString Modifier = new InternedString("Modifier");
  60. /// <summary>
  61. /// The spatial position control on input devices with spatial tracking.
  62. /// </summary>
  63. /// <remarks>
  64. /// Example: User head position in tracking-space using e.g. a head-tracking system. This could for example be a VR tracking system or another user-facing tracking sensor.
  65. /// </remarks>
  66. public static readonly InternedString Position = new InternedString("Position");
  67. /// <summary>
  68. /// The spatial orientation control on input devices with spatial tracking.
  69. /// </summary>
  70. /// <remarks>
  71. /// Example: User head-orientation in tracking-space using e.g. a head-tracking system. This could for example be a VR tracking system or another user-facing tracking sensor.
  72. /// </remarks>
  73. public static readonly InternedString Orientation = new InternedString("Orientation");
  74. /// <summary>
  75. /// The primary hat-switch control on input devices with hat-switches such as joysticks or gamepads.
  76. /// </summary>
  77. /// <remarks>
  78. /// Example: Joystick or gamepad hat-switch.
  79. /// </remarks>
  80. public static readonly InternedString Hatswitch = new InternedString("Hatswitch");
  81. /// <summary>
  82. /// Button to navigate to previous location.
  83. /// </summary>
  84. /// <remarks>
  85. /// Example: Escape on keyboard, B button on gamepad.
  86. ///
  87. /// In general, the "Back" control is used for moving backwards in the navigation history
  88. /// of a UI. This is used, for example, in hierarchical menu structures to move back to parent menus
  89. /// (e.g. from the "Settings" menu back to the "Main" menu). Consoles generally have stringent requirements
  90. /// as to which button has to fulfill this role.
  91. /// </remarks>
  92. public static readonly InternedString Back = new InternedString("Back");
  93. /// <summary>
  94. /// Button to navigate to next location.
  95. /// </summary>
  96. public static readonly InternedString Forward = new InternedString("Forward");
  97. /// <summary>
  98. /// Button to bring up menu.
  99. /// </summary>
  100. public static readonly InternedString Menu = new InternedString("Menu");
  101. /// <summary>
  102. /// Button to confirm the current choice.
  103. /// </summary>
  104. public static readonly InternedString Submit = new InternedString("Submit");
  105. ////REVIEW: isn't this the same as "Back"?
  106. /// <summary>
  107. /// Button to not accept the current choice.
  108. /// </summary>
  109. public static readonly InternedString Cancel = new InternedString("Cancel");
  110. /// <summary>
  111. /// Horizontal motion axis.
  112. /// </summary>
  113. /// <remarks>
  114. /// Example: X axis on mouse.
  115. /// </remarks>
  116. public static readonly InternedString Horizontal = new InternedString("Horizontal");
  117. /// <summary>
  118. /// Vertical motion axis.
  119. /// </summary>
  120. /// <remarks>
  121. /// Example: Y axis on mouse.
  122. /// </remarks>
  123. public static readonly InternedString Vertical = new InternedString("Vertical");
  124. /// <summary>
  125. /// Rotation around single, fixed axis.
  126. /// </summary>
  127. /// <remarks>
  128. /// Example: twist on joystick or twist of pen (few pens support that).
  129. /// </remarks>
  130. public static readonly InternedString Twist = new InternedString("Twist");
  131. /// <summary>
  132. /// Pressure level axis.
  133. /// </summary>
  134. /// <remarks>
  135. /// Example: pen pressure.
  136. /// </remarks>
  137. public static readonly InternedString Pressure = new InternedString("Pressure");
  138. /// <summary>
  139. /// Axis to scroll horizontally.
  140. /// </summary>
  141. public static readonly InternedString ScrollHorizontal = new InternedString("ScrollHorizontal");
  142. /// <summary>
  143. /// Axis to scroll vertically.
  144. /// </summary>
  145. public static readonly InternedString ScrollVertical = new InternedString("ScrollVertical");
  146. /// <summary>
  147. /// A screen-space point.
  148. /// </summary>
  149. /// <remarks>
  150. /// Example: Touch contact point.
  151. /// </remarks>
  152. public static readonly InternedString Point = new InternedString("Point");
  153. /// <summary>
  154. /// Low-frequency haptic motor for force-feedback.
  155. /// </summary>
  156. public static readonly InternedString LowFreqMotor = new InternedString("LowFreqMotor");
  157. /// <summary>
  158. /// High-frequency haptic motor for force-feedback.
  159. /// </summary>
  160. public static readonly InternedString HighFreqMotor = new InternedString("HighFreqMotor");
  161. /// <summary>
  162. /// Device in left hand.
  163. /// </summary>
  164. /// <remarks>
  165. /// Example: left hand XR controller.
  166. /// </remarks>
  167. public static readonly InternedString LeftHand = new InternedString("LeftHand");
  168. /// <summary>
  169. /// Device in right hand.
  170. /// </summary>
  171. /// <remarks>
  172. /// Example: right hand XR controller.
  173. /// </remarks>
  174. public static readonly InternedString RightHand = new InternedString("RightHand");
  175. /// <summary>
  176. /// Axis representing charge of battery (1=full, 0=empty).
  177. /// </summary>
  178. public static readonly InternedString BatteryStrength = new InternedString("BatteryStrength");
  179. }
  180. }