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/resources/InvalidPacksFilterGroup.h"
13#include "mc/resources/PackScope.h"
14
15// auto generated forward declare list
16// clang-format off
17class ContentView;
18class DlcChecker;
19class DlcUIWrapper;
20class IContentManager;
25class UIPropertyBag;
26struct ContentItem;
28struct PackContentItem;
29struct PackIdVersion;
30// clang-format on
31
33public:
34 // ResourcePacksScreenController inner types define
35 enum class PackRestriction : int {
36 Unrestricted = 0,
37 Restricted = 1,
38 };
39
40 using ConstContentItemPtr = ::std::shared_ptr<::ContentItem const>;
41
42 using ContentItemPtr = ::std::shared_ptr<::ContentItem>;
43
44 using PackContentItemPtr = ::std::shared_ptr<::PackContentItem>;
45
46 using ConstPackContentItemPtr = ::std::shared_ptr<::PackContentItem const>;
47
48public:
49 // member variables
50 // NOLINTBEGIN
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;
84 // NOLINTEND
85
86public:
87 // prevent constructor by default
88 ResourcePacksScreenController& operator=(ResourcePacksScreenController const&);
89 ResourcePacksScreenController(ResourcePacksScreenController const&);
90 ResourcePacksScreenController();
91
92public:
93 // virtual functions
94 // NOLINTBEGIN
95 virtual ~ResourcePacksScreenController() /*override*/ = default;
96
97 virtual ::ui::DirtyFlag tick() /*override*/;
98
99 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) /*override*/;
100 // NOLINTEND
101
102public:
103 // member functions
104 // NOLINTBEGIN
105 MCAPI ResourcePacksScreenController(
106 ::std::shared_ptr<::MainMenuScreenModel> model,
107 ::IContentManager& contentManager,
108 ::ContentType type,
109 ::InvalidPacksFilterGroup invalidFilter,
110 ::PackScope scope,
111 ::MultiplayerLockState& multiplayerState,
112 ::IContentManagerContext& contentManagerContext,
113 ::ResourcePacksScreenController* otherPacksTabController,
114 ::std::function<bool()> templateOptionLockGetter,
115 ::std::function<void()> copyWorld,
116 ::std::string initialPackId
117 );
118
119 MCAPI void _confirmationRestrictedPacksOnWorldDialog(
120 ::PackContentItem& packItem,
121 ::ContentView& contentView,
122 int collectionIndex,
123 ::PackListType fromPackList,
124 ::ResourcePacksScreenController::PackRestriction restriction
125 );
126
127 MCAPI ::ContentView* _getContentView(::UIPropertyBag* bag) const;
128
129 MCAPI ::ResourceLocation _getInvalidResource(int slot) const;
130
131 MCAPI ::ui::ViewRequest _handleAvailablePackClicked(::UIPropertyBag* bag);
132
133 MCAPI ::ui::ViewRequest _handleSortPackClicked(::UIPropertyBag* bag, int dir);
134
135 MCAPI bool _launchPlatformLockedDialogIfNeeded(
136 ::PackContentItem& packItem,
137 ::ContentView& contentView,
138 int collectionIndex,
139 ::PackListType fromPackList,
140 bool moveDependencies,
141 bool forceMove,
142 ::std::function<void()> moveCallback
143 );
144
145 MCAPI void _movePackAfterDataPackWarningMessage(::MoveResourcePackResult result);
146
147 MCAPI void _moveResource(
148 ::std::shared_ptr<::PackContentItem> const& item,
149 ::ContentView* contentView,
150 int collectionIndex,
151 ::PackListType fromPackList,
152 bool,
153 bool forceMove
154 );
155
156 MCAPI void _registerBindings();
157
158 MCAPI void _removeSelectedPacks(int beginAtIndex);
159
160 MCAPI void _showMissingDependencyMessage(::ContentView* contentView, int index, ::PackListType fromPacks);
161
162 MCAPI void _tryMoveResource(
163 ::std::shared_ptr<::PackContentItem> const& packItem,
164 ::ContentView* contentView,
165 int collectionIndex,
166 ::PackListType fromPackList,
167 bool forceMove
168 );
169
170 MCAPI void activatePack(::std::string const packId);
171 // NOLINTEND
172
173public:
174 // static functions
175 // NOLINTBEGIN
176 MCAPI static bool _hasRestrictedContent(::ContentView& view);
177 // NOLINTEND
178
179public:
180 // constructor thunks
181 // NOLINTBEGIN
182 MCAPI void* $ctor(
183 ::std::shared_ptr<::MainMenuScreenModel> model,
184 ::IContentManager& contentManager,
185 ::ContentType type,
186 ::InvalidPacksFilterGroup invalidFilter,
187 ::PackScope scope,
188 ::MultiplayerLockState& multiplayerState,
189 ::IContentManagerContext& contentManagerContext,
190 ::ResourcePacksScreenController* otherPacksTabController,
191 ::std::function<bool()> templateOptionLockGetter,
192 ::std::function<void()> copyWorld,
193 ::std::string initialPackId
194 );
195 // NOLINTEND
196
197public:
198 // virtual function thunks
199 // NOLINTBEGIN
200 MCAPI ::ui::DirtyFlag $tick();
201
202 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
203 // NOLINTEND
204};
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