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