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 uint64 _countAddonsActivated();
131
132 MCAPI void _determineHasLockedContent();
133
134 MCAPI void _displayAddonStackingWarningModal(::std::function<void(bool)> moveCallback);
135
136 MCAPI ::std::string _getAvailableSize(int slot);
137
138 MCAPI ::ContentView* _getContentView(::UIPropertyBag* bag) const;
139
140 MCAPI ::std::string _getCyclingIconFileSystem();
141
142 MCAPI ::Core::PathBuffer<::std::string> _getCyclingIconPath();
143
144 MCAPI ::Core::PathBuffer<::std::string> _getCyclingIconZip();
145
146 MCAPI ::PackListType _getPackListType(::UIPropertyBag* bag) const;
147
148 MCAPI ::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 _handleReportErrorsClicked(::UIPropertyBag* bag);
162
163 MCAPI ::ui::ViewRequest _handleSelectedPackMoveClicked(::UIPropertyBag* bag);
164
165 MCAPI ::ui::ViewRequest _handleSortPackClicked(::UIPropertyBag* bag, int dir);
166
167 MCAPI ::ui::ViewRequest _handleStoreClicked(::UIPropertyBag* bag);
168
169 MCAPI bool _hasRestrictedContent(::ContentView& view) const;
170
171 MCAPI bool _launchAddonStackingWarningDialogIfNeeded(
172 ::ContentView* contentView,
173 int collectionIndex,
174 ::PackListType fromPackList,
175 bool forceMove
176 );
177
178 MCAPI bool _launchPlatformLockedDialogIfNeeded(
179 ::PackContentItem& packItem,
180 ::ContentView& contentView,
181 int collectionIndex,
182 ::PackListType fromPackList,
183 bool moveDependencies,
184 bool forceMove,
185 ::std::function<void()> moveCallback
186 );
187
188 MCAPI void _movePackAfterDataPackWarningMessage(::MoveResourcePackResult result);
189
190 MCAPI void _moveResource(
191 ::std::shared_ptr<::PackContentItem> const& item,
192 ::ContentView* contentView,
193 int collectionIndex,
194 ::PackListType fromPackList,
195 bool,
196 bool forceMove
197 );
198
199 MCAPI void _registerBindings();
200
201 MCAPI void _registerEventHandlers();
202
203 MCAPI void _removeSelectedPacks(int beginAtIndex);
204
205 MCAPI void _showDataPackWarningMessage(::MoveResourcePackResult& result);
206
207 MCAPI void _showIncompatibleMessage(::ContentTierIncompatibleReason const& reason);
208
209 MCAPI void _showMissingDependencyMessage(::ContentView* contentView, int index, ::PackListType fromPacks);
210
211 MCAPI void _showStoreConnectFailedMessage();
212
213 MCAPI void _tryMoveResource(
214 ::std::shared_ptr<::ContentItem> const& item,
215 ::ContentView* contentView,
216 int collectionIndex,
217 ::PackListType fromPackList,
218 bool forceMove
219 );
220
221 MCAPI void activatePack(::std::string packId);
222 // NOLINTEND
223
224public:
225 // constructor thunks
226 // NOLINTBEGIN
227 MCAPI void* $ctor(
228 ::std::shared_ptr<::MainMenuScreenModel> model,
229 ::IContentManager& contentManager,
230 ::ContentType type,
231 ::InvalidPacksFilterGroup invalidFilter,
232 ::PackScope scope,
233 ::MultiplayerLockState& multiplayerState,
234 ::IContentManagerContext& contentManagerContext,
235 ::ResourcePacksScreenController* otherPacksTabController,
236 ::std::function<bool()> templateOptionLockGetter,
237 ::std::function<void()> copyWorld,
238 ::std::string initialPackId
239 );
240 // NOLINTEND
241
242public:
243 // destructor thunk
244 // NOLINTBEGIN
245 MCAPI void $dtor();
246 // NOLINTEND
247
248public:
249 // virtual function thunks
250 // NOLINTBEGIN
251 MCAPI ::ui::DirtyFlag $tick();
252
253 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
254 // NOLINTEND
255
256public:
257 // vftables
258 // NOLINTBEGIN
259 MCNAPI static void** $vftableForScreenController();
260
262 // NOLINTEND
263};
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