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
bitflags! {
	flags Button: u32 {
		/// A button has been pressed.
		const A = 0b100000000000000000000000,

		/// B button has been pressed.
		const B = 0b001000000000000000000000,

		/// X button has been pressed.
		const X = 0b010000000000000000000000,

		/// Y button has been pressed.
		const Y = 0b000100000000000000000000,

		/// Pad has been pressed.
		const PAD = 0b000000000000000000000010,

		/// Pad has been touched.
		const PAD_TOUCH = 0b000000000000000000001000,

		/// Pad down side has been pressed.
		const PAD_DOWN = 0b000000000000100000000000,

		/// Pad left side has been pressed.
		const PAD_LEFT = 0b000000000000010000000000,

		/// Pad right side has been pressed.
		const PAD_RIGHT = 0b000000000000001000000000,

		/// Pad up side has been pressed.
		const PAD_UP = 0b000000000000000100000000,

		/// Analog stick has been pressed.
		const STICK = 0b000000000000000001000000,

		/// Analog stick input is coming.
		const STICK_TOUCH = 0b000000000000000010000000,

		/// Trackpad has been pressed.
		const TRACK = 0b000000000000000000000100,

		/// Trackpad has been touched.
		const TRACK_TOUCH = 0b000000000000000000010000,

		/// Back button has been pressed.
		const BACK = 0b000000000001000000000000,

		/// Home button has been pressed.
		const HOME = 0b000000000010000000000000,

		/// Forward button has been pressed.
		const FORWARD = 0b000000000100000000000000,

		/// Left bumper has been pressed.
		const LEFT_BUMPER = 0b000010000000000000000000,

		/// Right bumper has been pressed.
		const RIGHT_BUMPER = 0b000001000000000000000000,

		/// Left grip has been pressed.
		const LEFT_GRIP = 0b00000001000000000000000,

		/// Right grip has been pressed.
		const RIGHT_GRIP = 0b00000000000000000000001,

		/// Left trigger has been fully pressed.
		const LEFT_TRIGGER = 0b000000100000000000000000,

		/// Right trigger has been fully pressed.
		const RIGHT_TRIGGER = 0b000000010000000000000000,
	}
}