LeviLamina
Loading...
Searching...
No Matches
ControlsSettingsScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/ViewRequest.h"
7#include "mc/client/gui/screens/controllers/SettingsScreenControllerBase.h"
8#include "mc/client/input/KeyboardType.h"
9#include "mc/deps/input/InputBindingMode.h"
10#include "mc/deps/input/InputMode.h"
11#include "mc/options/option_types/OptionID.h"
12
13// auto generated forward declare list
14// clang-format off
18class RemappingLayout;
19class UIPropertyBag;
21// clang-format on
22
24public:
25 // ControlsSettingsScreenController inner types declare
26 // clang-format off
27 struct BindingInfo;
28 struct KeyboardLayoutInfo;
29 // clang-format on
30
31 // ControlsSettingsScreenController inner types define
32 struct BindingInfo {
33 public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 32, ::std::string> mAction;
37 ::ll::TypedStorage<8, 32, ::std::string> mIcon;
38 ::ll::TypedStorage<8, 24, ::std::vector<int>> mKeys;
39 ::ll::TypedStorage<1, 1, bool> mActive;
40 ::ll::TypedStorage<4, 4, int> mLayoutIndex;
41 // NOLINTEND
42
43 public:
44 // prevent constructor by default
45 BindingInfo& operator=(BindingInfo const&);
46 BindingInfo();
47
48 public:
49 // member functions
50 // NOLINTBEGIN
51 MCAPI BindingInfo(::ControlsSettingsScreenController::BindingInfo const&);
52
53 MCAPI ~BindingInfo();
54 // NOLINTEND
55
56 public:
57 // constructor thunks
58 // NOLINTBEGIN
59 MCAPI void* $ctor(::ControlsSettingsScreenController::BindingInfo const&);
60 // NOLINTEND
61
62 public:
63 // destructor thunk
64 // NOLINTBEGIN
65 MCFOLD void $dtor();
66 // NOLINTEND
67 };
68
69 struct KeyboardLayoutInfo {
70 public:
71 // KeyboardLayoutInfo inner types declare
72 // clang-format off
74 // clang-format on
75
76 // KeyboardLayoutInfo inner types define
78 public:
79 // member variables
80 // NOLINTBEGIN
81 ::ll::TypedStorage<8, 24, ::std::vector<::ControlsSettingsScreenController::BindingInfo>> mBindings;
82 ::ll::TypedStorage<8, 32, ::std::string> mGridDimensionName;
83 ::ll::TypedStorage<8, 32, ::std::string> mCollectionName;
84 // NOLINTEND
85
86 public:
87 // member functions
88 // NOLINTBEGIN
89 MCAPI ~BindingInfoCollection();
90 // NOLINTEND
91
92 public:
93 // destructor thunk
94 // NOLINTBEGIN
95 MCAPI void $dtor();
96 // NOLINTEND
97 };
98
99 public:
100 // member variables
101 // NOLINTBEGIN
102 ::ll::TypedStorage<4, 4, ::KeyboardType const> mType;
103 ::ll::TypedStorage<8, 8, ::KeyboardRemappingLayout&> mLayout;
104 ::ll::TypedStorage<8, 88, ::ControlsSettingsScreenController::KeyboardLayoutInfo::BindingInfoCollection>
105 mNormalBinds;
106 ::ll::TypedStorage<8, 88, ::ControlsSettingsScreenController::KeyboardLayoutInfo::BindingInfoCollection>
107 mChordBinds;
108 ::ll::TypedStorage<8, 88, ::ControlsSettingsScreenController::KeyboardLayoutInfo::BindingInfoCollection>
109 mCommandMacroBinds;
110 // NOLINTEND
111
112 public:
113 // prevent constructor by default
114 KeyboardLayoutInfo& operator=(KeyboardLayoutInfo const&);
115 KeyboardLayoutInfo(KeyboardLayoutInfo const&);
116 KeyboardLayoutInfo();
117
118 public:
119 // member functions
120 // NOLINTBEGIN
121 MCAPI KeyboardLayoutInfo(
122 ::KeyboardType type,
123 ::KeyboardRemappingLayout& layout,
124 ::std::string gridDimensionName,
125 ::std::string collectionName,
126 ::std::string keyboardTypeString
127 );
128
129 MCAPI ~KeyboardLayoutInfo();
130 // NOLINTEND
131
132 public:
133 // constructor thunks
134 // NOLINTBEGIN
135 MCAPI void* $ctor(
136 ::KeyboardType type,
137 ::KeyboardRemappingLayout& layout,
138 ::std::string gridDimensionName,
139 ::std::string collectionName,
140 ::std::string keyboardTypeString
141 );
142 // NOLINTEND
143
144 public:
145 // destructor thunk
146 // NOLINTBEGIN
147 MCAPI void $dtor();
148 // NOLINTEND
149 };
150
151public:
152 // member variables
153 // NOLINTBEGIN
154 ::ll::TypedStorage<8, 8, ::GamePadRemappingLayout&> mGamepadLayout;
155 ::ll::TypedStorage<8, 24, ::std::vector<::ControlsSettingsScreenController::BindingInfo>> mGamepadBindings;
156 ::ll::TypedStorage<4, 4, ::KeyboardType> mCurrentKeyboardType;
157 ::ll::TypedStorage<8, 24, ::std::vector<::ControlsSettingsScreenController::KeyboardLayoutInfo>>
158 mKeyboardLayoutInformation;
159 ::ll::TypedStorage<4, 4, int> mSelectedIndex;
160 ::ll::TypedStorage<4, 4, ::InputBindingMode> mActiveBindingMode;
161 ::ll::TypedStorage<8, 8, ::std::vector<::std::string> const&> mDisabledInputMappings;
162 ::ll::TypedStorage<1, 1, bool> mCustomizeControlsDisableHover;
163 ::ll::TypedStorage<8, 320, ::std::array<::std::string, 10>> mCommandMacroCommands;
164 // NOLINTEND
165
166public:
167 // prevent constructor by default
168 ControlsSettingsScreenController& operator=(ControlsSettingsScreenController const&);
169 ControlsSettingsScreenController(ControlsSettingsScreenController const&);
170 ControlsSettingsScreenController();
171
172public:
173 // virtual functions
174 // NOLINTBEGIN
175 virtual ~ControlsSettingsScreenController() /*override*/;
176
177 virtual void _registerControllerCallbacks();
178
179 virtual void onTerminate() /*override*/;
180
181 virtual bool canExit() /*override*/;
182 // NOLINTEND
183
184public:
185 // member functions
186 // NOLINTBEGIN
187 MCAPI ControlsSettingsScreenController(
188 ::std::shared_ptr<::MainMenuScreenModel> model,
189 ::std::vector<::std::string> const& disabledInputMappings
190 );
191
192 MCAPI ::ui::ViewRequest _bindRawInputEvent(::RawInputScreenEventData& rawInputData);
193
194 MCAPI bool _canSetCommandMacroCommandAtIndex(
195 int collectionIndex,
196 ::ControlsSettingsScreenController::KeyboardLayoutInfo& layout
197 ) const;
198
199 MCFOLD bool _commandMacrosAllowed() const;
200
201 MCAPI void _generateBindingInfo(
202 ::std::vector<::ControlsSettingsScreenController::BindingInfo>& bindings,
203 ::RemappingLayout& layout,
204 uint layoutStartIndex
205 );
206
207 MCAPI void _generateKeyboardBindingInfo(
208 ::ControlsSettingsScreenController::KeyboardLayoutInfo& keyboardInfo,
209 uint layoutStartIndex
210 );
211
212 MCAPI ::std::string _getBindingText(
213 ::std::vector<::ControlsSettingsScreenController::BindingInfo>& bindings,
214 int collectionIndex,
215 ::RemappingLayout& layout
216 );
217
218 MCAPI ::InputBindingMode _getBindingTypeByCollectionName(::std::string const& collectionName) const;
219
220 MCAPI int _getIndexAdjustmentOffsetFromCollectionGroup(::std::string const& collectionGroup, int gridIndex);
221
222 MCAPI ::ui::ViewRequest _handleBindingButtonEvent(::UIPropertyBag* bag);
223
224 MCAPI bool _handleGamepadRawInputEvent(::RawInputScreenEventData& rawInputData);
225
226 MCAPI void _handleKeyboardRawInputEvent(::RawInputScreenEventData& rawInputData);
227
228 MCAPI ::ui::ViewRequest _handleResetBinding(::UIPropertyBag* bag);
229
230 MCAPI void _initKeyboardLayoutInformation(::MainMenuScreenModel const& model);
231
232 MCAPI bool
233 _mapRawInputToLayout(::RemappingLayout& layout, int keymappingIndex, ::RawInputScreenEventData& rawInputData);
234
235 MCAPI void _registerBinds();
236
237 MCAPI void _registerEvents();
238
239 MCAPI ::ui::ViewRequest _resetAllBindingsToDefault(::InputMode inputMode);
240
241 MCAPI void _setCommandMacroCommandAtIndex(int collectionIndex, ::std::string command);
242
243 MCAPI void
244 setUpCallbacksForBooleanInputOption(::OptionID optionID, ::InputMode inputMode, ::std::string const& toggleName);
245
246 MCAPI void
247 setUpCallbacksForFloatInputOption(::OptionID optionID, ::InputMode inputMode, ::std::string const& sliderName);
248 // NOLINTEND
249
250public:
251 // static variables
252 // NOLINTBEGIN
253 MCAPI static ::std::function<::std::string(::std::string const&, float, bool)>& floatSliderLabellerAsInt();
254
255 MCAPI static ::std::function<::std::string(::std::string const&, float, bool)>& floatSliderLabellerAsPercentInt();
256 // NOLINTEND
257
258public:
259 // constructor thunks
260 // NOLINTBEGIN
261 MCAPI void*
262 $ctor(::std::shared_ptr<::MainMenuScreenModel> model, ::std::vector<::std::string> const& disabledInputMappings);
263 // NOLINTEND
264
265public:
266 // destructor thunk
267 // NOLINTBEGIN
268 MCAPI void $dtor();
269 // NOLINTEND
270
271public:
272 // virtual function thunks
273 // NOLINTBEGIN
274 MCAPI void $_registerControllerCallbacks();
275
276 MCAPI void $onTerminate();
277
278 MCAPI bool $canExit();
279 // NOLINTEND
280
281public:
282 // vftables
283 // NOLINTBEGIN
285
286 MCNAPI static void** $vftableForScreenController();
287 // NOLINTEND
288};
Definition ControlsSettingsScreenController.h:5
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition GamePadRemappingLayout.h:5
Definition KeyboardRemappingLayout.h:5
Definition MainMenuScreenModel.h:5
Definition RemappingLayout.h:5
Definition SettingsScreenControllerBase.h:5
Definition UIPropertyBag.h:5
Definition ControlsSettingsScreenController.h:14
Definition ControlsSettingsScreenController.h:16
Definition RawInputScreenEventData.h:5