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;
20// clang-format on
21
23public:
24 // ControlsSettingsScreenController inner types declare
25 // clang-format off
26 struct BindingInfo;
27 struct KeyboardLayoutInfo;
28 // clang-format on
29
30 // ControlsSettingsScreenController inner types define
31 struct BindingInfo {
32 public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<8, 32, ::std::string> mAction;
36 ::ll::TypedStorage<8, 32, ::std::string> mIcon;
37 ::ll::TypedStorage<8, 24, ::std::vector<int>> mKeys;
38 ::ll::TypedStorage<1, 1, bool> mActive;
39 ::ll::TypedStorage<4, 4, int> mLayoutIndex;
40 // NOLINTEND
41 };
42
43 struct KeyboardLayoutInfo {
44 public:
45 // KeyboardLayoutInfo inner types declare
46 // clang-format off
48 // clang-format on
49
50 // KeyboardLayoutInfo inner types define
52 public:
53 // member variables
54 // NOLINTBEGIN
55 ::ll::TypedStorage<8, 24, ::std::vector<::ControlsSettingsScreenController::BindingInfo>> mBindings;
56 ::ll::TypedStorage<8, 32, ::std::string> mGridDimensionName;
57 ::ll::TypedStorage<8, 32, ::std::string> mCollectionName;
58 // NOLINTEND
59 };
60
61 public:
62 // member variables
63 // NOLINTBEGIN
64 ::ll::TypedStorage<4, 4, ::KeyboardType const> mType;
65 ::ll::TypedStorage<8, 8, ::KeyboardRemappingLayout&> mLayout;
66 ::ll::TypedStorage<8, 88, ::ControlsSettingsScreenController::KeyboardLayoutInfo::BindingInfoCollection>
67 mNormalBinds;
68 ::ll::TypedStorage<8, 88, ::ControlsSettingsScreenController::KeyboardLayoutInfo::BindingInfoCollection>
69 mChordBinds;
70 ::ll::TypedStorage<8, 88, ::ControlsSettingsScreenController::KeyboardLayoutInfo::BindingInfoCollection>
71 mCommandMacroBinds;
72 // NOLINTEND
73
74 public:
75 // prevent constructor by default
76 KeyboardLayoutInfo& operator=(KeyboardLayoutInfo const&);
77 KeyboardLayoutInfo(KeyboardLayoutInfo const&);
78 KeyboardLayoutInfo();
79 };
80
81public:
82 // member variables
83 // NOLINTBEGIN
84 ::ll::TypedStorage<8, 8, ::GamePadRemappingLayout&> mGamepadLayout;
85 ::ll::TypedStorage<8, 24, ::std::vector<::ControlsSettingsScreenController::BindingInfo>> mGamepadBindings;
86 ::ll::TypedStorage<4, 4, ::KeyboardType> mCurrentKeyboardType;
87 ::ll::TypedStorage<8, 24, ::std::vector<::ControlsSettingsScreenController::KeyboardLayoutInfo>>
88 mKeyboardLayoutInformation;
89 ::ll::TypedStorage<4, 4, int> mSelectedIndex;
90 ::ll::TypedStorage<4, 4, ::InputBindingMode> mActiveBindingMode;
91 ::ll::TypedStorage<8, 8, ::std::vector<::std::string> const&> mDisabledInputMappings;
92 ::ll::TypedStorage<1, 1, bool> mCustomizeControlsDisableHover;
93 ::ll::TypedStorage<8, 320, ::std::array<::std::string, 10>> mCommandMacroCommands;
94 // NOLINTEND
95
96public:
97 // prevent constructor by default
98 ControlsSettingsScreenController& operator=(ControlsSettingsScreenController const&);
99 ControlsSettingsScreenController(ControlsSettingsScreenController const&);
100 ControlsSettingsScreenController();
101
102public:
103 // virtual functions
104 // NOLINTBEGIN
105 virtual ~ControlsSettingsScreenController() /*override*/ = default;
106
107 virtual void _registerControllerCallbacks();
108
109 virtual void onTerminate() /*override*/;
110
111 virtual bool canExit() /*override*/;
112 // NOLINTEND
113
114public:
115 // member functions
116 // NOLINTBEGIN
117 MCAPI ControlsSettingsScreenController(
118 ::std::shared_ptr<::MainMenuScreenModel> model,
119 ::std::vector<::std::string> const& disabledInputMappings
120 );
121
122 MCFOLD bool _commandMacrosAllowed() const;
123
124 MCAPI void _generateBindingInfo(
125 ::std::vector<::ControlsSettingsScreenController::BindingInfo>& bindings,
126 ::RemappingLayout& layout,
127 uint layoutStartIndex
128 );
129
130 MCAPI void _generateKeyboardBindingInfo(
131 ::ControlsSettingsScreenController::KeyboardLayoutInfo& keyboardInfo,
132 uint layoutStartIndex
133 );
134
135 MCAPI ::std::string _getBindingText(
136 ::std::vector<::ControlsSettingsScreenController::BindingInfo>& bindings,
137 int collectionIndex,
138 ::RemappingLayout& layout
139 );
140
141 MCAPI ::std::string _getIconSprite(
142 ::std::vector<::ControlsSettingsScreenController::BindingInfo>& bindings,
143 int collectionIndex,
144 ::RemappingLayout& layout
145 );
146
147 MCAPI int _getIndexAdjustmentOffsetFromCollectionGroup(::std::string const& collectionGroup, int gridIndex);
148
149 MCAPI bool
150 _mapRawInputToLayout(::RemappingLayout& layout, int keymappingIndex, ::RawInputScreenEventData& rawInputData);
151
152 MCAPI ::ui::ViewRequest _resetAllBindingsToDefault(::InputMode inputMode);
153
154 MCAPI void _setCommandMacroCommandAtIndex(int collectionIndex, ::std::string const command);
155
156 MCAPI void
157 setUpCallbacksForBooleanInputOption(::OptionID optionID, ::InputMode inputMode, ::std::string const& toggleName);
158
159 MCAPI void
160 setUpCallbacksForFloatInputOption(::OptionID optionID, ::InputMode inputMode, ::std::string const& sliderName);
161 // NOLINTEND
162
163public:
164 // static functions
165 // NOLINTBEGIN
166 MCAPI static bool _canSetCommandMacroCommandAtIndex(
167 int collectionIndex,
168 ::ControlsSettingsScreenController::KeyboardLayoutInfo& layout
169 );
170 // NOLINTEND
171
172public:
173 // static variables
174 // NOLINTBEGIN
175 MCAPI static ::std::function<::std::string(::std::string const&, float, bool)>& floatSliderLabellerAsInt();
176
177 MCAPI static ::std::function<::std::string(::std::string const&, float, bool)>& floatSliderLabellerAsPercentInt();
178 // NOLINTEND
179
180public:
181 // constructor thunks
182 // NOLINTBEGIN
183 MCAPI void*
184 $ctor(::std::shared_ptr<::MainMenuScreenModel> model, ::std::vector<::std::string> const& disabledInputMappings);
185 // NOLINTEND
186
187public:
188 // virtual function thunks
189 // NOLINTBEGIN
190 MCAPI void $_registerControllerCallbacks();
191
192 MCAPI void $onTerminate();
193
194 MCAPI bool $canExit();
195 // NOLINTEND
196};
Definition ControlsSettingsScreenController.h:5
Definition GamePadRemappingLayout.h:5
Definition KeyboardRemappingLayout.h:5
Definition MainMenuScreenModel.h:5
Definition RemappingLayout.h:5
Definition SettingsScreenControllerBase.h:5
Definition ControlsSettingsScreenController.h:14
Definition ControlsSettingsScreenController.h:16
Definition RawInputScreenEventData.h:5