LeviLamina
Loading...
Searching...
No Matches
ResourcePacksScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/GameEventNotification.h"
8#include "mc/client/gui/ViewRequest.h"
9#include "mc/client/gui/screens/controllers/SettingsScreenControllerBase.h"
10#include "mc/client/gui/screens/models/ContentType.h"
11#include "mc/client/gui/screens/models/PackListType.h"
12#include "mc/deps/core/file/PathBuffer.h"
13#include "mc/resources/InvalidPacksFilterGroup.h"
14#include "mc/resources/PackScope.h"
15
16// auto generated forward declare list
17// clang-format off
19class ContentView;
20class DlcChecker;
21class DlcUIWrapper;
22class IContentManager;
27class UIPropertyBag;
28struct ContentItem;
30struct PackContentItem;
31struct PackIdVersion;
32struct PackMoveResult;
33// clang-format on
34
36public:
37 // ResourcePacksScreenController inner types define
38 enum class PackRestriction : int {
39 Unrestricted = 0,
40 Restricted = 1,
41 };
42
43 using ConstContentItemPtr = ::std::shared_ptr<::ContentItem const>;
44
45 using ContentItemPtr = ::std::shared_ptr<::ContentItem>;
46
47 using PackContentItemPtr = ::std::shared_ptr<::PackContentItem>;
48
49 using ConstPackContentItemPtr = ::std::shared_ptr<::PackContentItem const>;
50
51public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
55 ::ll::TypedStorage<8, 8, ::ContentView*> mSelectedContentView;
56 ::ll::TypedStorage<8, 8, ::ContentView*> mAvailableContentView;
57 ::ll::TypedStorage<8, 8, ::ContentView*> mRealmsContentView;
58 ::ll::TypedStorage<8, 8, ::ContentView*> mInvalidContentView;
59 ::ll::TypedStorage<8, 8, ::ContentView*> mUnownedContentView;
60 ::ll::TypedStorage<1, 1, ::PackScope> mScope;
61 ::ll::TypedStorage<8, 8, uint64> mSelectedId;
62 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mExistanceTracker;
63 ::ll::TypedStorage<8, 8, ::ResourcePacksScreenController*> mOtherPacksTabController;
64 ::ll::TypedStorage<8, 8, ::ContentType> mContentType;
65 ::ll::TypedStorage<4, 4, uint> mIconIndex;
66 ::ll::TypedStorage<1, 1, bool> mChooseFromActive;
67 ::ll::TypedStorage<8, 24, ::InvalidPacksFilterGroup> mInvalidPacksFilter;
68 ::ll::TypedStorage<8, 24, ::std::vector<::ResourceLocation>> mInvalidPacks;
69 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
70 ::ll::TypedStorage<8, 8, ::MultiplayerLockState&> mMultiplayerState;
71 ::ll::TypedStorage<8, 8, ::std::chrono::seconds const> mTwoSecondInterval;
72 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastIconCycle;
73 ::ll::TypedStorage<1, 1, bool> mSelectedContentUpdated;
74 ::ll::TypedStorage<1, 1, bool> mRepopulateReports;
75 ::ll::TypedStorage<1, 1, bool> mRepopulatingReports;
76 ::ll::TypedStorage<1, 1, bool> mSelectedExpanded;
77 ::ll::TypedStorage<1, 1, bool> mAvailableExpanded;
78 ::ll::TypedStorage<1, 1, bool> mRealmsExpanded;
79 ::ll::TypedStorage<1, 1, bool> mUnownedExpanded;
80 ::ll::TypedStorage<1, 1, bool> mDoNotShowAddonWarning;
81 ::ll::TypedStorage<1, 1, bool> mGetInitialSelectedPacks;
82 ::ll::TypedStorage<8, 24, ::std::vector<::PackIdVersion>> mInitialSelectedPacks;
83 ::ll::TypedStorage<8, 32, ::std::string> mInitialPackId;
84 ::ll::TypedStorage<8, 64, ::std::function<void()>> mCopyWorldCallback;
85 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mIsWorldTemplateOptionLockedCallback;
86 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcChecker>> mDlcChecker;
87 // NOLINTEND
88
89public:
90 // prevent constructor by default
91 ResourcePacksScreenController& operator=(ResourcePacksScreenController const&);
92 ResourcePacksScreenController(ResourcePacksScreenController const&);
93 ResourcePacksScreenController();
94
95public:
96 // virtual functions
97 // NOLINTBEGIN
98 virtual ~ResourcePacksScreenController() /*override*/;
99
100 virtual ::ui::DirtyFlag tick() /*override*/;
101
102 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) /*override*/;
103 // NOLINTEND
104
105public:
106 // member functions
107 // NOLINTBEGIN
108 MCAPI ResourcePacksScreenController(
109 ::std::shared_ptr<::MainMenuScreenModel> model,
110 ::IContentManager& contentManager,
111 ::ContentType type,
112 ::InvalidPacksFilterGroup invalidFilter,
113 ::PackScope scope,
114 ::MultiplayerLockState& multiplayerState,
115 ::IContentManagerContext& contentManagerContext,
116 ::ResourcePacksScreenController* otherPacksTabController,
117 ::std::function<bool()> templateOptionLockGetter,
118 ::std::function<void()> copyWorld,
119 ::std::string initialPackId
120 );
121
122 MCAPI void _confirmationRestrictedPacksOnWorldDialog(
123 ::PackContentItem& packItem,
124 ::ContentView& contentView,
125 int collectionIndex,
126 ::PackListType fromPackList,
127 ::ResourcePacksScreenController::PackRestriction restriction
128 );
129
130 MCAPI void _displayAddonStackingWarningModal(::std::function<void(bool)> moveCallback);
131
132 MCAPI void _displayAddonStackingWarningModalFromLink();
133
134 MCAPI ::std::string _getAvailableSize(int slot);
135
136 MCAPI ::ContentView* _getContentView(::UIPropertyBag* bag) const;
137
138 MCAPI ::std::string _getCyclingIconFileSystem();
139
140 MCAPI ::Core::PathBuffer<::std::string> _getCyclingIconPath();
141
142 MCAPI ::Core::PathBuffer<::std::string> _getCyclingIconZip();
143
144 MCAPI ::ResourceLocation _getInvalidResource(int slot) const;
145
146 MCAPI ::PackListType _getPackListType(::UIPropertyBag* bag) const;
147
148 MCFOLD ::ui::ViewRequest _handleAvailablePackClicked(::UIPropertyBag* bag);
149
150 MCAPI void _handleCycleIcon();
151
152 MCAPI ::ui::ViewRequest _handleInvalidPackClicked(::UIPropertyBag* bag);
153
154 MCAPI void _handlePackSelectResult(
155 ::PackMoveResult const& result,
156 ::ContentView* contentView,
157 int collectionIndex,
158 ::PackListType packListType
159 );
160
161 MCAPI ::ui::ViewRequest _handleReadToggleClicked(::UIPropertyBag* bag);
162
163 MCFOLD ::ui::ViewRequest _handleRealmsPackClicked(::UIPropertyBag* bag);
164
165 MCAPI ::ui::ViewRequest _handleReportErrorsClicked(::UIPropertyBag* bag);
166
167 MCAPI ::ui::ViewRequest _handleSelectedPackClicked(::UIPropertyBag* bag);
168
169 MCAPI ::ui::ViewRequest _handleSelectedPackMoveClicked(::UIPropertyBag* bag);
170
171 MCAPI ::ui::ViewRequest _handleSortPackClicked(::UIPropertyBag* bag, int dir);
172
173 MCAPI ::ui::ViewRequest _handleStoreClicked(::UIPropertyBag* bag);
174
175 MCAPI bool _hasRestrictedContent(::ContentView& view) const;
176
177 MCAPI bool _launchAddonStackingWarningDialogIfNeeded(
178 ::ContentView* contentView,
179 int collectionIndex,
180 ::PackListType fromPackList,
181 bool forceMove
182 );
183
184 MCAPI bool _launchPlatformLockedDialogIfNeeded(
185 ::PackContentItem& packItem,
186 ::ContentView& contentView,
187 int collectionIndex,
188 ::PackListType fromPackList,
189 bool moveDependencies,
190 bool forceMove,
191 ::std::function<void()> moveCallback
192 );
193
194 MCAPI void _movePackAfterDataPackWarningMessage(::MoveResourcePackResult result);
195
196 MCAPI void _moveResource(
197 ::std::shared_ptr<::PackContentItem> const& item,
198 ::ContentView* contentView,
199 int collectionIndex,
200 ::PackListType fromPackList,
201 bool forceMove,
202 bool
203 );
204
205 MCAPI void _registerBindings();
206
207 MCAPI void _registerEventHandlers();
208
209 MCAPI void _removeSelectedPacks(int beginAtIndex);
210
211 MCAPI void _showDataPackWarningMessage(::MoveResourcePackResult& result);
212
213 MCAPI void _showIncompatibleMessage(::ContentTierIncompatibleReason const& reason);
214
215 MCAPI void _showMissingDependencyMessage(::ContentView* contentView, int index, ::PackListType fromPacks);
216
217 MCAPI void _showStoreConnectFailedMessage();
218
219 MCAPI void _tryMoveResource(
220 ::std::shared_ptr<::PackContentItem> const& packItem,
221 ::ContentView* contentView,
222 int collectionIndex,
223 ::PackListType fromPackList,
224 bool forceMove
225 );
226
227 MCAPI void activatePack(::std::string packId);
228
229 MCAPI void setOtherPacksTabController(::ResourcePacksScreenController* otherPacksTab);
230 // NOLINTEND
231
232public:
233 // constructor thunks
234 // NOLINTBEGIN
235 MCAPI void* $ctor(
236 ::std::shared_ptr<::MainMenuScreenModel> model,
237 ::IContentManager& contentManager,
238 ::ContentType type,
239 ::InvalidPacksFilterGroup invalidFilter,
240 ::PackScope scope,
241 ::MultiplayerLockState& multiplayerState,
242 ::IContentManagerContext& contentManagerContext,
243 ::ResourcePacksScreenController* otherPacksTabController,
244 ::std::function<bool()> templateOptionLockGetter,
245 ::std::function<void()> copyWorld,
246 ::std::string initialPackId
247 );
248 // NOLINTEND
249
250public:
251 // destructor thunk
252 // NOLINTBEGIN
253 MCAPI void $dtor();
254 // NOLINTEND
255
256public:
257 // virtual function thunks
258 // NOLINTBEGIN
259 MCAPI ::ui::DirtyFlag $tick();
260
261 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
262 // NOLINTEND
263
264public:
265 // vftables
266 // NOLINTBEGIN
267 MCNAPI static void** $vftableForScreenController();
268
270 // NOLINTEND
271};
Definition ContentTierIncompatibleReason.h:5
Definition ContentView.h:5
Definition DlcChecker.h:5
Definition DlcUIWrapper.h:5
Definition IContentManagerContext.h:5
Definition IContentManager.h:5
Definition MainMenuScreenModel.h:5
Definition MultiplayerLockState.h:5
Definition ResourceLocation.h:15
Definition ResourcePacksScreenController.h:5
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition SettingsScreenControllerBase.h:5
Definition UIPropertyBag.h:5
Definition ContentItem.h:5
Definition MoveResourcePackResult.h:5
Definition PackContentItem.h:5
Definition PackIdVersion.h:10
Definition PackMoveResult.h:5