File size: 5,502 Bytes
18a519f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
#if UNITY_EDITOR || UNITY_ANDROID || PACKAGE_DOCS_GENERATION
using System;
using System.Linq;
using System.Runtime.InteropServices;
using UnityEngine.InputSystem.Android.LowLevel;
using UnityEngine.InputSystem.Utilities;

namespace UnityEngine.InputSystem.Android.LowLevel
{
    /// <summary>
    /// Enum used to identity the axis type in the Android motion input event. See <see cref="AndroidGameControllerState.axis"/>.
    /// See https://developer.android.com/reference/android/view/MotionEvent#constants_1 for more details.
    /// </summary>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags", Justification = "False positive")]
    public enum AndroidAxis
    {
        /// <summary>
        /// X axis of a motion event.
        /// </summary>
        X = 0,

        /// <summary>
        /// Y axis of a motion event.
        /// </summary>
        Y = 1,

        /// <summary>
        /// Pressure axis of a motion event.
        /// </summary>
        Pressure = 2,

        /// <summary>
        /// Size axis of a motion event.
        /// </summary>
        Size = 3,

        /// <summary>
        /// TouchMajor axis  of a motion event.
        /// </summary>
        TouchMajor = 4,

        /// <summary>
        /// TouchMinor axis of a motion event.
        /// </summary>
        TouchMinor = 5,

        /// <summary>
        /// ToolMajor axis of a motion event.
        /// </summary>
        ToolMajor = 6,

        /// <summary>
        /// ToolMinor axis of a motion event.
        /// </summary>
        ToolMinor = 7,

        /// <summary>
        /// Orientation axis of a motion event.
        /// </summary>
        Orientation = 8,

        /// <summary>
        /// Vertical Scroll of a motion event.
        /// </summary>
        Vscroll = 9,

        /// <summary>
        /// Horizontal Scroll axis of a motion event.
        /// </summary>
        Hscroll = 10,

        /// <summary>
        /// Z axis of a motion event.
        /// </summary>
        Z = 11,

        /// <summary>
        /// X Rotation axis of a motion event.
        /// </summary>
        Rx = 12,

        /// <summary>
        /// Y Rotation axis of a motion event.
        /// </summary>
        Ry = 13,

        /// <summary>
        /// Z Rotation axis of a motion event.
        /// </summary>
        Rz = 14,

        /// <summary>
        /// Hat X axis of a motion event.
        /// </summary>
        HatX = 15,

        /// <summary>
        /// Hat Y axis of a motion event.
        /// </summary>
        HatY = 16,

        /// <summary>
        /// Left Trigger axis of a motion event.
        /// </summary>
        Ltrigger = 17,

        /// <summary>
        /// Right Trigger axis of a motion event.
        /// </summary>
        Rtrigger = 18,

        /// <summary>
        /// Throttle axis of a motion event.
        /// </summary>
        Throttle = 19,

        /// <summary>
        /// Rudder axis of a motion event.
        /// </summary>
        Rudder = 20,

        /// <summary>
        /// Wheel axis of a motion event.
        /// </summary>
        Wheel = 21,

        /// <summary>
        /// Gas axis of a motion event.
        /// </summary>
        Gas = 22,

        /// <summary>
        /// Break axis of a motion event.
        /// </summary>
        Brake = 23,

        /// <summary>
        /// Distance axis of a motion event.
        /// </summary>
        Distance = 24,

        /// <summary>
        /// Tilt axis of a motion event.
        /// </summary>
        Tilt = 25,

        /// <summary>
        /// Generic 1 axis of a motion event.
        /// </summary>
        Generic1 = 32,

        /// <summary>
        /// Generic 2 axis of a motion event.
        /// </summary>
        Generic2 = 33,

        /// <summary>
        /// Generic 3 axis of a motion event.
        /// </summary>
        Generic3 = 34,

        /// <summary>
        /// Generic 4 axis of a motion event.
        /// </summary>
        Generic4 = 35,

        /// <summary>
        /// Generic 5 axis of a motion event.
        /// </summary>
        Generic5 = 36,

        /// <summary>
        /// Generic 6 axis of a motion event.
        /// </summary>
        Generic6 = 37,

        /// <summary>
        /// Generic 7 axis of a motion event.
        /// </summary>
        Generic7 = 38,

        /// <summary>
        /// Generic 8 axis of a motion event.
        /// </summary>
        Generic8 = 39,

        /// <summary>
        /// Generic 9 axis of a motion event.
        /// </summary>
        Generic9 = 40,

        /// <summary>
        /// Generic 10 axis of a motion event.
        /// </summary>
        Generic10 = 41,

        /// <summary>
        /// Generic 11 axis of a motion event.
        /// </summary>
        Generic11 = 42,

        /// <summary>
        /// Generic 12 axis of a motion event.
        /// </summary>
        Generic12 = 43,

        /// <summary>
        /// Generic 13 axis of a motion event.
        /// </summary>
        Generic13 = 44,

        /// <summary>
        /// Generic 14 axis of a motion event.
        /// </summary>
        Generic14 = 45,

        /// <summary>
        /// Generic 15 axis of a motion event.
        /// </summary>
        Generic15 = 46,

        /// <summary>
        /// Generic 16 axis of a motion event.
        /// </summary>
        Generic16 = 47,
    }
}
#endif // UNITY_EDITOR || UNITY_ANDROID