Skip to main content

GamepadSettings.ixx File

Configuration settings for gamepad input processing. More...

Included Headers

#include <algorithm>

Namespaces Index

namespacehelios
namespaceengine
namespaceinput
namespacegamepad

Classes Index

classGamepadSettings

Configuration class for gamepad input normalization and axis behavior. More...

Description

Configuration settings for gamepad input processing.

File Listing

The file content with the documentation metadata removed is:

1
5module;
6
7#include <algorithm>
8
9export module helios.engine.input.gamepad.GamepadSettings;
10
11export namespace helios::engine::input::gamepad {
12
38
42 float leftStickDeadzone_ = 0.0f;
43
47 float rightStickDeadzone_ = 0.0f;
48
52 bool invertLeftX_ = false;
53
57 bool invertLeftY_ = false;
58
62 bool invertRightX_ = false;
63
67 bool invertRightY_ = false;
68
69 public:
70
74 ~GamepadSettings() = default;
75
79 GamepadSettings() = default;
80
89 deadzone = std::clamp(deadzone, 0.0f, 0.9f);
90 leftStickDeadzone_ = deadzone;
91 return *this;
92 }
93
102 deadzone = std::clamp(deadzone, 0.0f, 0.9f);
103 rightStickDeadzone_ = deadzone;
104 return *this;
105 }
106
115 invertLeftX_ = invert;
116 return *this;
117 }
118
127 invertLeftY_ = invert;
128 return *this;
129 }
130
139 invertRightX_ = invert;
140 return *this;
141 }
142
151 invertRightY_ = invert;
152 return *this;
153 }
154
161 return leftStickDeadzone_;
162 }
163
170 return rightStickDeadzone_;
171 }
172
179 return invertLeftX_;
180 }
181
188 return invertLeftY_;
189 }
190
197 return invertRightX_;
198 }
199
206 return invertRightY_;
207 }
208
209 };
210
211}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.