Skip to main content

Gamepad.ixx File

Identifiers for supported gamepads. More...

Namespaces Index

namespacehelios
namespaceinput

Input handling and management. More...

namespacetypes

Input type definitions. More...

Description

Identifiers for supported gamepads.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file Gamepad.ixx
3 * @brief Identifiers for supported gamepads.
4 */
5module;
6
7export module helios.input.types.Gamepad;
8
9export namespace helios::input::types {
10
11 /**
12 * @brief Bitmask enum for gamepad input buttons.
13 *
14 * @details Each value represents a single button as a bit flag,
15 * allowing efficient combination and querying of multiple inputs.
16 */
17 enum class GamepadInput {
18
19 /**
20 * @brief Start button.
21 */
22 Start = 1 << 0,
23
24 /**
25 * @brief Select/Back button.
26 */
27 Select = 1 << 5,
28
29 /**
30 * @brief A button (bottom face button).
31 */
32 A = 1 << 1,
33
34 /**
35 * @brief B button (right face button).
36 */
37 B = 1 << 2,
38
39 /**
40 * @brief X button (left face button).
41 */
42 X = 1 << 3,
43
44 /**
45 * @brief Y button (top face button).
46 */
47 Y = 1 << 4,
48
49 /**
50 * @brief Left stick button (L3).
51 */
52 LeftStick = 1 << 6,
53
54 /**
55 * @brief Right stick button (R3).
56 */
57 RightStick = 1 << 7,
58
59 /**
60 * @brief D-pad up.
61 */
62 Up = 1 << 8,
63
64 /**
65 * @brief D-pad down.
66 */
67 Down = 1 << 9,
68
69 /**
70 * @brief D-pad left.
71 */
72 Left = 1 << 10,
73
74 /**
75 * @brief D-pad right.
76 */
77 Right = 1 << 11,
78
79 /**
80 * @brief Left bumper (L1).
81 */
82 LeftBumper = 1 << 12,
83
84 /**
85 * @brief Right bumper (R1).
86 */
87 RightBumper = 1 << 13,
88
89 /**
90 * @brief Left trigger (L2).
91 */
92 LeftTrigger = 1 << 14,
93
94 /**
95 * @brief Right trigger (R2).
96 */
97 RightTrigger = 1 << 15
98 };
99
100 /**
101 * @brief Enumerates gamepad identifiers in bitmask-friendly values.
102 *
103 * This enumeration provides identifiers for gamepads, commonly identified
104 * by the logical port they are mapped to. Values are chosen for convenient
105 * bitmask composition (ONE | TWO, ...).
106 *
107 * Implementing APIs should map their platform-specific gamepad indices to
108 * these identifiers.
109 */
110 enum Gamepad {
111 ONE = 1, // 1
112 TWO = 2, // 10
113 THREE = 4, // 100
114 FOUR = 8, // 1000
115
116
117
118 /**
119 * @brief Number of logical gamepad entries represented by this enum.
120 */
122 };
123
124}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.