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/resources/InvalidPacksFilterGroup.h"
13#include "mc/resources/PackScope.h"
35 enum class PackRestriction :
int {
40 using ConstContentItemPtr = ::std::shared_ptr<::ContentItem const>;
42 using ContentItemPtr = ::std::shared_ptr<::ContentItem>;
44 using PackContentItemPtr = ::std::shared_ptr<::PackContentItem>;
46 using ConstPackContentItemPtr = ::std::shared_ptr<::PackContentItem const>;
51 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
52 ::ll::TypedStorage<8, 8, ::ContentView*> mSelectedContentView;
53 ::ll::TypedStorage<8, 8, ::ContentView*> mAvailableContentView;
54 ::ll::TypedStorage<8, 8, ::ContentView*> mRealmsContentView;
55 ::ll::TypedStorage<8, 8, ::ContentView*> mInvalidContentView;
56 ::ll::TypedStorage<8, 8, ::ContentView*> mUnownedContentView;
57 ::ll::TypedStorage<1, 1, ::PackScope> mScope;
58 ::ll::TypedStorage<8, 8, uint64> mSelectedId;
59 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mExistanceTracker;
60 ::ll::TypedStorage<8, 8, ::ResourcePacksScreenController*> mOtherPacksTabController;
61 ::ll::TypedStorage<8, 8, ::ContentType> mContentType;
62 ::ll::TypedStorage<4, 4, uint> mIconIndex;
63 ::ll::TypedStorage<1, 1, bool> mChooseFromActive;
64 ::ll::TypedStorage<8, 24, ::InvalidPacksFilterGroup> mInvalidPacksFilter;
65 ::ll::TypedStorage<8, 24, ::std::vector<::ResourceLocation>> mInvalidPacks;
66 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
67 ::ll::TypedStorage<8, 8, ::MultiplayerLockState&> mMultiplayerState;
68 ::ll::TypedStorage<8, 8, ::std::chrono::seconds const> mTwoSecondInterval;
69 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastIconCycle;
70 ::ll::TypedStorage<1, 1, bool> mSelectedContentUpdated;
71 ::ll::TypedStorage<1, 1, bool> mRepopulateReports;
72 ::ll::TypedStorage<1, 1, bool> mRepopulatingReports;
73 ::ll::TypedStorage<1, 1, bool> mSelectedExpanded;
74 ::ll::TypedStorage<1, 1, bool> mAvailableExpanded;
75 ::ll::TypedStorage<1, 1, bool> mRealmsExpanded;
76 ::ll::TypedStorage<1, 1, bool> mUnownedExpanded;
77 ::ll::TypedStorage<1, 1, bool> mDoNotShowAddonWarning;
78 ::ll::TypedStorage<1, 1, bool> mGetInitialSelectedPacks;
79 ::ll::TypedStorage<8, 24, ::std::vector<::PackIdVersion>> mInitialSelectedPacks;
80 ::ll::TypedStorage<8, 32, ::std::string> mInitialPackId;
81 ::ll::TypedStorage<8, 64, ::std::function<void()>> mCopyWorldCallback;
82 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mIsWorldTemplateOptionLockedCallback;
83 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcChecker>> mDlcChecker;
88 ResourcePacksScreenController& operator=(ResourcePacksScreenController
const&);
89 ResourcePacksScreenController(ResourcePacksScreenController
const&);
90 ResourcePacksScreenController();
95 virtual ~ResourcePacksScreenController() =
default;
97 virtual ::ui::DirtyFlag tick() ;
99 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) ;
105 MCAPI ResourcePacksScreenController(
106 ::std::shared_ptr<::MainMenuScreenModel> model,
107 ::IContentManager& contentManager,
109 ::InvalidPacksFilterGroup invalidFilter,
111 ::MultiplayerLockState& multiplayerState,
112 ::IContentManagerContext& contentManagerContext,
113 ::ResourcePacksScreenController* otherPacksTabController,
114 ::std::function<
bool()> templateOptionLockGetter,
115 ::std::function<
void()> copyWorld,
116 ::std::string initialPackId
119 MCAPI
void _confirmationRestrictedPacksOnWorldDialog(
120 ::PackContentItem& packItem,
121 ::ContentView& contentView,
123 ::PackListType fromPackList,
124 ::ResourcePacksScreenController::PackRestriction restriction
127 MCAPI ::ContentView* _getContentView(::UIPropertyBag* bag)
const;
129 MCAPI ::ResourceLocation _getInvalidResource(
int slot)
const;
131 MCAPI ::ui::ViewRequest _handleAvailablePackClicked(::UIPropertyBag* bag);
133 MCAPI ::ui::ViewRequest _handleSortPackClicked(::UIPropertyBag* bag,
int dir);
135 MCAPI
bool _launchPlatformLockedDialogIfNeeded(
136 ::PackContentItem& packItem,
137 ::ContentView& contentView,
139 ::PackListType fromPackList,
140 bool moveDependencies,
142 ::std::function<
void()> moveCallback
145 MCAPI
void _movePackAfterDataPackWarningMessage(::MoveResourcePackResult result);
147 MCAPI
void _moveResource(
148 ::std::shared_ptr<::PackContentItem>
const& item,
149 ::ContentView* contentView,
151 ::PackListType fromPackList,
156 MCAPI
void _registerBindings();
158 MCAPI
void _removeSelectedPacks(
int beginAtIndex);
160 MCAPI
void _showMissingDependencyMessage(::ContentView* contentView,
int index, ::PackListType fromPacks);
162 MCAPI
void _tryMoveResource(
163 ::std::shared_ptr<::PackContentItem>
const& packItem,
164 ::ContentView* contentView,
166 ::PackListType fromPackList,
170 MCAPI
void activatePack(::std::string
const packId);
176 MCAPI
static bool _hasRestrictedContent(::ContentView& view);
183 ::std::shared_ptr<::MainMenuScreenModel> model,
184 ::IContentManager& contentManager,
186 ::InvalidPacksFilterGroup invalidFilter,
188 ::MultiplayerLockState& multiplayerState,
189 ::IContentManagerContext& contentManagerContext,
190 ::ResourcePacksScreenController* otherPacksTabController,
191 ::std::function<
bool()> templateOptionLockGetter,
192 ::std::function<
void()> copyWorld,
193 ::std::string initialPackId
200 MCAPI ::ui::DirtyFlag $tick();
202 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
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
Definition SettingsScreenControllerBase.h:5
Definition UIPropertyBag.h:5
Definition ContentItem.h:5
Definition MoveResourcePackResult.h:5
Definition PackContentItem.h:5
Definition PackIdVersion.h:10