Skip to content
LeviMC
English
AutoLightDark
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/utility/pub_sub/Subscription.h"
13#include "mc/resources/InvalidPacksFilterGroup.h"
14#include "mc/resources/PackScope.h"
15
16// auto generated forward declare list
17// clang-format off
18class ContentView;
19class DlcChecker;
20class DlcUIWrapper;
21class IContentManager;
26class UIPropertyBag;
27struct ContentItem;
29struct PackContentItem;
30struct PackIdVersion;
31// clang-format on
32
34public:
35 // ResourcePacksScreenController inner types define
36 enum class PackRestriction : int {
37 Unrestricted = 0,
38 Restricted = 1,
39 };
40
41 using ConstContentItemPtr = ::std::shared_ptr<::ContentItem const>;
42
43 using ContentItemPtr = ::std::shared_ptr<::ContentItem>;
44
45 using PackContentItemPtr = ::std::shared_ptr<::PackContentItem>;
46
47 using ConstPackContentItemPtr = ::std::shared_ptr<::PackContentItem const>;
48
49public:
50 // member variables
51 // NOLINTBEGIN
52 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
53 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mContentReloadSubscription;
54 ::ll::TypedStorage<8, 8, ::ContentView*> mSelectedContentView;
55 ::ll::TypedStorage<8, 8, ::ContentView*> mAvailableContentView;
56 ::ll::TypedStorage<8, 8, ::ContentView*> mRealmsContentView;
57 ::ll::TypedStorage<8, 8, ::ContentView*> mInvalidContentView;
58 ::ll::TypedStorage<8, 8, ::ContentView*> mUnownedContentView;
59 ::ll::TypedStorage<1, 1, ::PackScope> mScope;
60 ::ll::TypedStorage<8, 8, uint64> mSelectedId;
61 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mExistanceTracker;
62 ::ll::TypedStorage<8, 8, ::ResourcePacksScreenController*> mOtherPacksTabController;
63 ::ll::TypedStorage<8, 8, ::ContentType> mContentType;
64 ::ll::TypedStorage<4, 4, uint> mIconIndex;
65 ::ll::TypedStorage<1, 1, bool> mChooseFromActive;
66 ::ll::TypedStorage<8, 24, ::InvalidPacksFilterGroup> mInvalidPacksFilter;
67 ::ll::TypedStorage<8, 24, ::std::vector<::ResourceLocation>> mInvalidPacks;
68 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
69 ::ll::TypedStorage<8, 8, ::MultiplayerLockState&> mMultiplayerState;
70 ::ll::TypedStorage<8, 8, ::std::chrono::seconds const> mTwoSecondInterval;
71 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastIconCycle;
72 ::ll::TypedStorage<1, 1, bool> mSelectedContentUpdated;
73 ::ll::TypedStorage<1, 1, bool> mRepopulateReports;
74 ::ll::TypedStorage<1, 1, bool> mRepopulatingReports;
75 ::ll::TypedStorage<1, 1, bool> mSelectedExpanded;
76 ::ll::TypedStorage<1, 1, bool> mAvailableExpanded;
77 ::ll::TypedStorage<1, 1, bool> mRealmsExpanded;
78 ::ll::TypedStorage<1, 1, bool> mUnownedExpanded;
79 ::ll::TypedStorage<1, 1, bool> mDoNotShowAddonWarning;
80 ::ll::TypedStorage<1, 1, bool> mGetInitialSelectedPacks;
81 ::ll::TypedStorage<8, 24, ::std::vector<::PackIdVersion>> mInitialSelectedPacks;
82 ::ll::TypedStorage<8, 32, ::std::string> mInitialPackId;
83 ::ll::TypedStorage<8, 64, ::std::function<void()>> mCopyWorldCallback;
84 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mIsWorldTemplateOptionLockedCallback;
85 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcChecker>> mDlcChecker;
86 // NOLINTEND
87
88public:
89 // prevent constructor by default
90 ResourcePacksScreenController& operator=(ResourcePacksScreenController const&);
91 ResourcePacksScreenController(ResourcePacksScreenController const&);
92 ResourcePacksScreenController();
93
94public:
95 // virtual functions
96 // NOLINTBEGIN
97 virtual ~ResourcePacksScreenController() /*override*/ = default;
98
99 virtual ::ui::DirtyFlag tick() /*override*/;
100
101 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) /*override*/;
102 // NOLINTEND
103
104public:
105 // member functions
106 // NOLINTBEGIN
108 ::std::shared_ptr<::MainMenuScreenModel> model,
109 ::IContentManager& contentManager,
110 ::ContentType type,
111 ::InvalidPacksFilterGroup invalidFilter,
112 ::PackScope scope,
113 ::MultiplayerLockState& multiplayerState,
114 ::IContentManagerContext& contentManagerContext,
115 ::ResourcePacksScreenController* otherPacksTabController,
116 ::std::function<bool()> templateOptionLockGetter,
117 ::std::function<void()> copyWorld,
118 ::std::string initialPackId
119 );
120
122 ::PackContentItem& packItem,
123 ::ContentView& contentView,
124 int collectionIndex,
125 ::PackListType fromPackList,
126 ::ResourcePacksScreenController::PackRestriction restriction
127 );
128
129 MCNAPI ::ContentView* _getContentView(::UIPropertyBag* bag) const;
130
131 MCNAPI ::ResourceLocation _getInvalidResource(int slot) const;
132
133 MCNAPI ::ui::ViewRequest _handleAvailablePackClicked(::UIPropertyBag* bag);
134
135 MCNAPI ::ui::ViewRequest _handleSortPackClicked(::UIPropertyBag* bag, int dir);
136
138 ::PackContentItem& packItem,
139 ::ContentView& contentView,
140 int collectionIndex,
141 ::PackListType fromPackList,
142 bool moveDependencies,
143 bool forceMove,
144 ::std::function<void()> moveCallback
145 );
146
148
149 MCNAPI void _moveResource(
150 ::std::shared_ptr<::PackContentItem> const& item,
151 ::ContentView* contentView,
152 int collectionIndex,
153 ::PackListType fromPackList,
154 bool,
155 bool forceMove
156 );
157
158 MCNAPI void _registerBindings();
159
160 MCNAPI void _removeSelectedPacks(int beginAtIndex);
161
162 MCNAPI void _showMissingDependencyMessage(::ContentView* contentView, int index, ::PackListType fromPacks);
163
164 MCNAPI void _tryMoveResource(
165 ::std::shared_ptr<::PackContentItem> const& packItem,
166 ::ContentView* contentView,
167 int collectionIndex,
168 ::PackListType fromPackList,
169 bool forceMove
170 );
171
172 MCNAPI void activatePack(::std::string const packId);
173 // NOLINTEND
174
175public:
176 // static functions
177 // NOLINTBEGIN
178 MCNAPI static bool _hasRestrictedContent(::ContentView& view);
179 // NOLINTEND
180
181public:
182 // constructor thunks
183 // NOLINTBEGIN
184 MCNAPI void* $ctor(
185 ::std::shared_ptr<::MainMenuScreenModel> model,
186 ::IContentManager& contentManager,
187 ::ContentType type,
188 ::InvalidPacksFilterGroup invalidFilter,
189 ::PackScope scope,
190 ::MultiplayerLockState& multiplayerState,
191 ::IContentManagerContext& contentManagerContext,
192 ::ResourcePacksScreenController* otherPacksTabController,
193 ::std::function<bool()> templateOptionLockGetter,
194 ::std::function<void()> copyWorld,
195 ::std::string initialPackId
196 );
197 // NOLINTEND
198
199public:
200 // virtual function thunks
201 // NOLINTBEGIN
202 MCNAPI ::ui::DirtyFlag $tick();
203
204 MCNAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
205 // NOLINTEND
206};
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
MCAPI ResourcePacksScreenController(::std::shared_ptr<::MainMenuScreenModel > model, ::IContentManager &contentManager, ::ContentType type, ::InvalidPacksFilterGroup invalidFilter, ::PackScope scope, ::MultiplayerLockState &multiplayerState, ::IContentManagerContext &contentManagerContext, ::ResourcePacksScreenController *otherPacksTabController, ::std::function< bool()> templateOptionLockGetter, ::std::function< void()> copyWorld, ::std::string initialPackId)
MCAPI void _showMissingDependencyMessage(::ContentView *contentView, int index, ::PackListType fromPacks)
MCAPI void _confirmationRestrictedPacksOnWorldDialog(::PackContentItem &packItem, ::ContentView &contentView, int collectionIndex, ::PackListType fromPackList, ::ResourcePacksScreenController::PackRestriction restriction)
MCAPI void _moveResource(::std::shared_ptr<::PackContentItem > const &item, ::ContentView *contentView, int collectionIndex, ::PackListType fromPackList, bool, bool forceMove)
MCAPI void * $ctor(::std::shared_ptr<::MainMenuScreenModel > model, ::IContentManager &contentManager, ::ContentType type, ::InvalidPacksFilterGroup invalidFilter, ::PackScope scope, ::MultiplayerLockState &multiplayerState, ::IContentManagerContext &contentManagerContext, ::ResourcePacksScreenController *otherPacksTabController, ::std::function< bool()> templateOptionLockGetter, ::std::function< void()> copyWorld, ::std::string initialPackId)
MCAPI void _removeSelectedPacks(int beginAtIndex)
MCAPI::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification)
MCAPI void _movePackAfterDataPackWarningMessage(::MoveResourcePackResult result)
MCAPI void activatePack(::std::string const packId)
MCAPI bool _launchPlatformLockedDialogIfNeeded(::PackContentItem &packItem, ::ContentView &contentView, int collectionIndex, ::PackListType fromPackList, bool moveDependencies, bool forceMove, ::std::function< void()> moveCallback)
MCAPI::ui::ViewRequest _handleAvailablePackClicked(::UIPropertyBag *bag)
MCAPI::ui::ViewRequest _handleSortPackClicked(::UIPropertyBag *bag, int dir)
MCAPI::ui::DirtyFlag $tick()
MCAPI void _tryMoveResource(::std::shared_ptr<::PackContentItem > const &packItem, ::ContentView *contentView, int collectionIndex, ::PackListType fromPackList, bool forceMove)
static MCAPI bool _hasRestrictedContent(::ContentView &view)
MCAPI::ContentView * _getContentView(::UIPropertyBag *bag) const
MCAPI::ResourceLocation _getInvalidResource(int slot) const
Definition SettingsScreenControllerBase.h:5
Definition UIPropertyBag.h:5
Definition ContentItem.h:5
Definition InvalidPacksFilterGroup.h:5
Definition MoveResourcePackResult.h:5
Definition PackContentItem.h:5
Definition PackIdVersion.h:10