QuasarEngine
Cross-platform 3D engine and editor
Loading...
Searching...
No Matches
GamepadCodes.h
Go to the documentation of this file.
1#pragma once
2
7
8#include <cstddef>
9#include <cstdint>
10
11namespace Quasar
12{
14 inline constexpr std::size_t MaxGamepads = 16;
15
17 inline constexpr std::size_t GamepadButtonCount = 15;
18
20 inline constexpr std::size_t GamepadAxisCount = 6;
21
25 enum class GamepadId : std::uint8_t
26 {
27 };
28
33 enum class GamepadButton : std::uint8_t
34 {
35 A = 0,
36 B = 1,
37 X = 2,
38 Y = 3,
41 Back = 6,
42 Start = 7,
43 Guide = 8,
46 DPadUp = 11,
47 DPadRight = 12,
48 DPadDown = 13,
50 };
51
56 enum class GamepadAxis : std::uint8_t
57 {
58 LeftX = 0,
59 LeftY = 1,
60 RightX = 2,
61 RightY = 3,
64 };
65}
Contains all the engine code.
constexpr std::size_t MaxGamepads
Number of gamepads that can be connected at the same time.
Definition GamepadCodes.h:14
GamepadButton
Button of a gamepad, at the position of the buttons of an Xbox controller.
Definition GamepadCodes.h:34
@ X
Left face button: X on Xbox, Square on PlayStation.
Definition GamepadCodes.h:37
@ Back
Back or View button, Share on PlayStation.
Definition GamepadCodes.h:41
@ DPadLeft
Left on the directional pad.
Definition GamepadCodes.h:49
@ LeftThumb
Press on the left stick.
Definition GamepadCodes.h:44
@ RightBumper
Right shoulder button.
Definition GamepadCodes.h:40
@ Y
Top face button: Y on Xbox, Triangle on PlayStation.
Definition GamepadCodes.h:38
@ Guide
Central button with the logo of the controller.
Definition GamepadCodes.h:43
@ DPadUp
Up on the directional pad.
Definition GamepadCodes.h:46
@ A
Bottom face button: A on Xbox, Cross on PlayStation.
Definition GamepadCodes.h:35
@ DPadDown
Down on the directional pad.
Definition GamepadCodes.h:48
@ LeftBumper
Left shoulder button.
Definition GamepadCodes.h:39
@ B
Right face button: B on Xbox, Circle on PlayStation.
Definition GamepadCodes.h:36
@ Start
Start or Menu button, Options on PlayStation.
Definition GamepadCodes.h:42
@ RightThumb
Press on the right stick.
Definition GamepadCodes.h:45
@ DPadRight
Right on the directional pad.
Definition GamepadCodes.h:47
constexpr std::size_t GamepadAxisCount
Number of axes of a gamepad.
Definition GamepadCodes.h:20
constexpr std::size_t GamepadButtonCount
Number of buttons of a gamepad.
Definition GamepadCodes.h:17
GamepadId
Identifies a connected gamepad, from 0 to MaxGamepads - 1.
Definition GamepadCodes.h:26
GamepadAxis
Axis of a gamepad.
Definition GamepadCodes.h:57
@ RightTrigger
Right trigger.
Definition GamepadCodes.h:63
@ LeftY
Vertical axis of the left stick.
Definition GamepadCodes.h:59
@ LeftTrigger
Left trigger.
Definition GamepadCodes.h:62
@ LeftX
Horizontal axis of the left stick.
Definition GamepadCodes.h:58
@ RightX
Horizontal axis of the right stick.
Definition GamepadCodes.h:60
@ RightY
Vertical axis of the right stick.
Definition GamepadCodes.h:61