3#include "mc/_HeaderOutputPredefine.h"
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"
38 enum class PackRestriction :
int {
43 using ConstContentItemPtr = ::std::shared_ptr<::ContentItem const>;
45 using ContentItemPtr = ::std::shared_ptr<::ContentItem>;
47 using PackContentItemPtr = ::std::shared_ptr<::PackContentItem>;
49 using ConstPackContentItemPtr = ::std::shared_ptr<::PackContentItem const>;
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;
91 ResourcePacksScreenController& operator=(ResourcePacksScreenController
const&);
92 ResourcePacksScreenController(ResourcePacksScreenController
const&);
93 ResourcePacksScreenController();
98 virtual ~ResourcePacksScreenController() ;
100 virtual ::ui::DirtyFlag tick() ;
102 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) ;
108 MCAPI ResourcePacksScreenController(
109 ::std::shared_ptr<::MainMenuScreenModel> model,
110 ::IContentManager& contentManager,
112 ::InvalidPacksFilterGroup invalidFilter,
114 ::MultiplayerLockState& multiplayerState,
115 ::IContentManagerContext& contentManagerContext,
116 ::ResourcePacksScreenController* otherPacksTabController,
117 ::std::function<
bool()> templateOptionLockGetter,
118 ::std::function<
void()> copyWorld,
119 ::std::string initialPackId
122 MCAPI
void _confirmationRestrictedPacksOnWorldDialog(
123 ::PackContentItem& packItem,
124 ::ContentView& contentView,
126 ::PackListType fromPackList,
127 ::ResourcePacksScreenController::PackRestriction restriction
130 MCAPI uint64 _countAddonsActivated();
132 MCAPI
void _determineHasLockedContent();
134 MCAPI
void _displayAddonStackingWarningModal(::std::function<
void(
bool)> moveCallback);
136 MCAPI ::std::string _getAvailableSize(
int slot);
138 MCAPI ::ContentView* _getContentView(::UIPropertyBag* bag)
const;
140 MCAPI ::std::string _getCyclingIconFileSystem();
142 MCAPI ::Core::PathBuffer<::std::string> _getCyclingIconPath();
144 MCAPI ::Core::PathBuffer<::std::string> _getCyclingIconZip();
146 MCAPI ::PackListType _getPackListType(::UIPropertyBag* bag)
const;
148 MCAPI ::ui::ViewRequest _handleAvailablePackClicked(::UIPropertyBag* bag);
150 MCAPI
void _handleCycleIcon();
152 MCAPI ::ui::ViewRequest _handleInvalidPackClicked(::UIPropertyBag* bag);
154 MCAPI
void _handlePackSelectResult(
155 ::PackMoveResult
const& result,
156 ::ContentView* contentView,
158 ::PackListType packListType
161 MCAPI ::ui::ViewRequest _handleReportErrorsClicked(::UIPropertyBag* bag);
163 MCAPI ::ui::ViewRequest _handleSelectedPackMoveClicked(::UIPropertyBag* bag);
165 MCAPI ::ui::ViewRequest _handleSortPackClicked(::UIPropertyBag* bag,
int dir);
167 MCAPI ::ui::ViewRequest _handleStoreClicked(::UIPropertyBag* bag);
169 MCAPI
bool _hasRestrictedContent(::ContentView& view)
const;
171 MCAPI
bool _launchAddonStackingWarningDialogIfNeeded(
172 ::ContentView* contentView,
174 ::PackListType fromPackList,
178 MCAPI
bool _launchPlatformLockedDialogIfNeeded(
179 ::PackContentItem& packItem,
180 ::ContentView& contentView,
182 ::PackListType fromPackList,
183 bool moveDependencies,
185 ::std::function<
void()> moveCallback
188 MCAPI
void _movePackAfterDataPackWarningMessage(::MoveResourcePackResult result);
190 MCAPI
void _moveResource(
191 ::std::shared_ptr<::PackContentItem>
const& item,
192 ::ContentView* contentView,
194 ::PackListType fromPackList,
199 MCAPI
void _registerBindings();
201 MCAPI
void _registerEventHandlers();
203 MCAPI
void _removeSelectedPacks(
int beginAtIndex);
205 MCAPI
void _showDataPackWarningMessage(::MoveResourcePackResult& result);
207 MCAPI
void _showIncompatibleMessage(::ContentTierIncompatibleReason
const& reason);
209 MCAPI
void _showMissingDependencyMessage(::ContentView* contentView,
int index, ::PackListType fromPacks);
211 MCAPI
void _showStoreConnectFailedMessage();
213 MCAPI
void _tryMoveResource(
214 ::std::shared_ptr<::ContentItem>
const& item,
215 ::ContentView* contentView,
217 ::PackListType fromPackList,
221 MCAPI
void activatePack(::std::string packId);
228 ::std::shared_ptr<::MainMenuScreenModel> model,
229 ::IContentManager& contentManager,
231 ::InvalidPacksFilterGroup invalidFilter,
233 ::MultiplayerLockState& multiplayerState,
234 ::IContentManagerContext& contentManagerContext,
235 ::ResourcePacksScreenController* otherPacksTabController,
236 ::std::function<
bool()> templateOptionLockGetter,
237 ::std::function<
void()> copyWorld,
238 ::std::string initialPackId
251 MCAPI ::ui::DirtyFlag $tick();
253 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
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