LeviLamina
Loading...
Searching...
No Matches
PlayScreenController.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/SceneType.h"
9#include "mc/client/gui/ViewRequest.h"
10#include "mc/client/gui/screens/controllers/MainMenuScreenController.h"
11#include "mc/client/gui/screens/controllers/ModalScreenButtonId.h"
12#include "mc/client/gui/screens/models/PlayScreenDefaultTab.h"
13#include "mc/client/legacy/ImportStatus.h"
14#include "mc/client/network/realms/RealmsAPI.h"
15#include "mc/client/world/LocalWorldInfo.h"
16#include "mc/client/world/NetworkWorldType.h"
17#include "mc/deps/core/threading/TaskGroup.h"
18#include "mc/deps/core/utility/pub_sub/Subscription.h"
19
20// auto generated forward declare list
21// clang-format off
22class DlcChecker;
23class DlcUIWrapper;
25class PlayScreenModel;
26class ServicesManager;
27struct ImportResult;
28struct LegacyWorldInfo;
29struct NetworkWorldInfo;
30namespace Json { class Value; }
31namespace Realms { struct World; }
32namespace Social { struct PermissionCheckResult; }
33namespace ui { class ScreenTechStackSelector; }
34// clang-format on
35
37public:
38 // PlayScreenController inner types define
39 enum class ConvertProgressState : int {
40 Closed = 0,
41 Active = 1,
42 TryClose = 2,
43 };
44
45 enum class ServerCollectionName : int {
46 ThirdParty = 0,
47 External = 1,
48 Invalid = 2,
49 };
50
51public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::PlayScreenModel>> mPlayScreenModel;
55 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
56 ::ll::TypedStorage<4, 4, ::PlayScreenDefaultTab> mActiveTabIndex;
57 ::ll::TypedStorage<1, 1, bool> mForceRefreshRealmsOnOpen;
58 ::ll::TypedStorage<1, 1, bool> mForceRefreshThirdPartyServersOnOpen;
59 ::ll::TypedStorage<1, 1, bool> mRealmsBindingsDirty;
60 ::ll::TypedStorage<1, 1, bool> mCheckUGCOnTabChange;
61 ::ll::TypedStorage<1, 1, bool> mRealmsCompatibilityCheckComplete;
62 ::ll::TypedStorage<4, 4, ::RealmsAPI::Compatibility> mRealmsCompatibility;
63 ::ll::TypedStorage<1, 1, bool> mStorageDropdownActive;
64 ::ll::TypedStorage<1, 1, bool> mUseTabs;
65 ::ll::TypedStorage<4, 4, uint> mIconBouncesInProgress;
66 ::ll::TypedStorage<1, 1, bool> mFriendsIconBouncing;
67 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mBounceCooldownTimer;
68 ::ll::TypedStorage<8, 8, ::std::chrono::seconds const> mBounceCooldownTimerDuration;
69 ::ll::TypedStorage<1, 1, bool> mInviteIconDisplayed;
70 ::ll::TypedStorage<1, 1, bool> mFriendTabViewed;
71 ::ll::TypedStorage<1, 1, bool> mPlatformRestrictsMultiplayer;
72 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlatformMultiplayerRestrictions>> mPlatformMultiplayerRestrictions;
73 ::ll::TypedStorage<8, 32, ::std::string> mInviteCode;
74 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
75 ::ll::TypedStorage<4, 4, ::PlayScreenController::ServerCollectionName> mCurrentServerCollectionName;
76 ::ll::TypedStorage<4, 4, ::PlayScreenController::ConvertProgressState> mProgressScreenState;
77 ::ll::TypedStorage<8, 32, ::std::string> mDirtyLevelId;
78 ::ll::TypedStorage<1, 1, bool> mLayoutDirty;
79 ::ll::TypedStorage<4, 4, int> mCurrentServerIndex;
80 ::ll::TypedStorage<4, 4, int> mCurrentScreenshotIndex;
81 ::ll::TypedStorage<1, 1, bool> mIsDescriptionExpanded;
82 ::ll::TypedStorage<1, 1, bool> mIsNewsExpanded;
83 ::ll::TypedStorage<1, 1, bool> mAddServerInfoVisible;
84 ::ll::TypedStorage<1, 1, bool> mNavigatedToAddServer;
85 ::ll::TypedStorage<8, 32, ::std::string> mRealmsTrialRandomText;
86 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcChecker>> mDlcChecker;
87 ::ll::TypedStorage<8, 1040, ::LocalWorldInfo> mTempLocalWorldInfo;
88 ::ll::TypedStorage<8, 8, ::ui::ScreenTechStackSelector&> mScreenTechStackSelector;
89 ::ll::TypedStorage<1, 1, bool> mNeedsOfflineAuthCode;
90 ::ll::TypedStorage<1, 1, bool> mOwnershipVerificationAnimationVisibleState;
91 ::ll::TypedStorage<1, 1, bool> mDirty;
92 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mBuildGameListSubscription;
93 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mMCTokenUpdateSubscription;
94 // NOLINTEND
95
96public:
97 // prevent constructor by default
98 PlayScreenController& operator=(PlayScreenController const&);
99 PlayScreenController(PlayScreenController const&);
100 PlayScreenController();
101
102public:
103 // virtual functions
104 // NOLINTBEGIN
105 virtual ~PlayScreenController() /*override*/;
106
107 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
108
109 virtual void onOpen() /*override*/;
110
111 virtual void onLeave() /*override*/;
112
113 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) /*override*/;
114
115 virtual ::ui::DirtyFlag tick() /*override*/;
116
117 virtual ::std::string getAdditionalScreenInfo() const /*override*/;
118
119 virtual ::ui::SceneType getSceneType() const /*override*/;
120
121 virtual ::std::string _getButtonADescription() /*override*/;
122
123 virtual void _registerEventHandlers();
124 // NOLINTEND
125
126public:
127 // member functions
128 // NOLINTBEGIN
129 MCAPI PlayScreenController(
130 ::std::shared_ptr<::PlayScreenModel> model,
131 ::PlayScreenDefaultTab tab,
132 ::ui::ScreenTechStackSelector& screenTechStackSelector,
133 ::std::string const& dirtyLevelId
134 );
135
136 MCAPI bool _checkIfPingIsLoading(int collectionIndex);
137
138 MCAPI ::ui::ViewRequest _convertLegacyWorld(::LegacyWorldInfo const& world);
139
140 MCAPI void _displayRealmsFailedToJoinModal(::std::function<void(::ModalScreenButtonId)> callback);
141
142 MCAPI void _errorStoreUnavailable();
143
144 MCAPI ::LegacyWorldInfo const& _getBetaRetailLegacyWorld(int index) const;
145
146 MCAPI ::std::string _getCrossPlatformFriendsGridWarningText();
147
148 MCAPI ::std::string _getFriendsGridWarningText();
149
150 MCAPI ::std::string _getGeneralMultiplayerWarningText();
151
152 MCAPI int _getIndexForRealmsCollection(::std::string const& collectionName, int collectionIndex) const;
153
154 MCAPI ::LegacyWorldInfo const& _getLegacyWorld(int index);
155
156 MCAPI ::std::function<void(::Legacy::ImportStatus, float, ::std::shared_ptr<::ImportResult>)>
157 _getLegacyWorldConvertCallback(::LegacyWorldInfo const& worldInfo, ::std::string const& levelId);
158
159 MCAPI ::NetworkWorldInfo const& _getNetworkWorld(int index, ::NetworkWorldType networkType);
160
161 MCAPI ::NetworkWorldType _getNetworkWorldTypeFromCollection(::std::string const& collectionName) const;
162
163 MCAPI ::std::string _getRealmsUnavailableMessage() const;
164
165 MCAPI int _getTotalServerCount() const;
166
167 MCAPI ::ui::ViewRequest _handleLeaveRealm(int index);
168
169 MCAPI ::ui::ViewRequest _handleStartNetworkItem(int index, ::NetworkWorldType nwt);
170
171 MCAPI ::ui::ViewRequest _handleStartRealm(int index);
172
173 MCAPI bool _isRealmCreationPossible() const;
174
175 MCAPI bool _isRealmExpiringForPlatform(::Realms::World const& world);
176
177 MCAPI void _navigatePlayScreenTechStack(::PlayScreenDefaultTab tab);
178
179 MCAPI void _navigateToCreateWorldScreen();
180
181 MCAPI void _onMCTokenUpdated(::ServicesManager*);
182
183 MCAPI void _onWorldConversionCompleted(::std::shared_ptr<::ImportResult> result, ::std::string const& levelId);
184
185 MCAPI void _openProcessWorldProgressDialog();
186
187 MCAPI ::Social::PermissionCheckResult _parentalControlsDialogCheck();
188
189 MCAPI void _registerBindings();
190
191 MCAPI void _setOwnershipVerificationAnimationVisibleState();
192
193 MCAPI bool _shouldShowLockIcon(::LocalWorldInfo const& world) const;
194
195 MCAPI ::ui::ViewRequest _startLocalWorld(::LocalWorldInfo const& world);
196
197 MCAPI ::ui::ViewRequest _startNetworkWorld(::NetworkWorldInfo const& world, ::NetworkWorldType worldType);
198
199 MCAPI ::ui::DirtyFlag _tickRealms();
200
201 MCAPI bool _updateFriendsTab();
202
203 MCAPI void _updateNeedsOfflineAuthCode();
204
205 MCAPI bool _userGeneratedContentRestrictionsDialogCheck() const;
206
207 MCAPI bool _worldHasImage(::NetworkWorldType type, int collectionIndex);
208 // NOLINTEND
209
210public:
211 // static variables
212 // NOLINTBEGIN
213 MCAPI static ::std::chrono::seconds& mFiveSecondInterval();
214 // NOLINTEND
215
216public:
217 // constructor thunks
218 // NOLINTBEGIN
219 MCAPI void* $ctor(
220 ::std::shared_ptr<::PlayScreenModel> model,
221 ::PlayScreenDefaultTab tab,
222 ::ui::ScreenTechStackSelector& screenTechStackSelector,
223 ::std::string const& dirtyLevelId
224 );
225 // NOLINTEND
226
227public:
228 // destructor thunk
229 // NOLINTBEGIN
230 MCAPI void $dtor();
231 // NOLINTEND
232
233public:
234 // virtual function thunks
235 // NOLINTBEGIN
236 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
237
238 MCAPI void $onOpen();
239
240 MCAPI void $onLeave();
241
242 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
243
244 MCAPI ::ui::DirtyFlag $tick();
245
246 MCAPI ::std::string $getAdditionalScreenInfo() const;
247
248 MCFOLD ::ui::SceneType $getSceneType() const;
249
250 MCFOLD ::std::string $_getButtonADescription();
251
252 MCAPI void $_registerEventHandlers();
253 // NOLINTEND
254
255public:
256 // vftables
257 // NOLINTBEGIN
259
260 MCNAPI static void** $vftableForScreenController();
261 // NOLINTEND
262};
Definition DlcChecker.h:5
Definition DlcUIWrapper.h:5
Definition Value.h:16
Definition MainMenuScreenController.h:5
Definition PlatformMultiplayerRestrictions.h:5
Definition PlayScreenController.h:5
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForScreenController()
Definition PlayScreenModel.h:5
Definition ScreenTechStackSelector.h:7
Definition ImportResult.h:5
Definition LegacyWorldInfo.h:5
Definition NetworkWorldInfo.h:5
Definition World.h:7
Definition PermissionCheckResult.h:7