3#include "mc/_HeaderOutputPredefine.h"
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"
30namespace Json {
class Value; }
31namespace Realms {
struct World; }
39 enum class ConvertProgressState :
int {
45 enum class ServerCollectionName :
int {
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;
98 PlayScreenController& operator=(PlayScreenController
const&);
99 PlayScreenController(PlayScreenController
const&);
100 PlayScreenController();
105 virtual ~PlayScreenController() ;
107 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
109 virtual void onOpen() ;
111 virtual void onLeave() ;
113 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification notification) ;
115 virtual ::ui::DirtyFlag tick() ;
117 virtual ::std::string getAdditionalScreenInfo() const ;
119 virtual ::ui::SceneType getSceneType() const ;
121 virtual ::std::
string _getButtonADescription() ;
123 virtual
void _registerEventHandlers();
129 MCAPI PlayScreenController(
130 ::std::shared_ptr<::PlayScreenModel> model,
131 ::PlayScreenDefaultTab tab,
132 ::ui::ScreenTechStackSelector& screenTechStackSelector,
133 ::std::
string const& dirtyLevelId
136 MCAPI
bool _checkIfPingIsLoading(
int collectionIndex);
138 MCAPI ::ui::ViewRequest _convertLegacyWorld(::LegacyWorldInfo const& world);
140 MCAPI
void _displayRealmsFailedToJoinModal(::std::function<
void(::ModalScreenButtonId)> callback);
142 MCAPI
void _errorStoreUnavailable();
144 MCAPI ::LegacyWorldInfo const& _getBetaRetailLegacyWorld(
int index) const;
146 MCAPI ::std::
string _getCrossPlatformFriendsGridWarningText();
148 MCAPI ::std::
string _getFriendsGridWarningText();
150 MCAPI ::std::
string _getGeneralMultiplayerWarningText();
152 MCAPI
int _getIndexForRealmsCollection(::std::
string const& collectionName,
int collectionIndex) const;
154 MCAPI ::LegacyWorldInfo const& _getLegacyWorld(
int index);
156 MCAPI ::std::function<
void(::Legacy::ImportStatus,
float, ::std::shared_ptr<::ImportResult>)>
157 _getLegacyWorldConvertCallback(::LegacyWorldInfo const& worldInfo, ::std::
string const& levelId);
159 MCAPI ::NetworkWorldInfo const& _getNetworkWorld(
int index, ::NetworkWorldType networkType);
161 MCAPI ::NetworkWorldType _getNetworkWorldTypeFromCollection(::std::
string const& collectionName) const;
163 MCAPI ::std::
string _getRealmsUnavailableMessage() const;
165 MCAPI
int _getTotalServerCount() const;
167 MCAPI ::ui::ViewRequest _handleLeaveRealm(
int index);
169 MCAPI ::ui::ViewRequest _handleStartNetworkItem(
int index, ::NetworkWorldType nwt);
171 MCAPI ::ui::ViewRequest _handleStartRealm(
int index);
173 MCAPI
bool _isRealmCreationPossible() const;
175 MCAPI
bool _isRealmExpiringForPlatform(::Realms::World const& world);
177 MCAPI
void _navigatePlayScreenTechStack(::PlayScreenDefaultTab tab);
179 MCAPI
void _navigateToCreateWorldScreen();
181 MCAPI
void _onMCTokenUpdated(::ServicesManager*);
183 MCAPI
void _onWorldConversionCompleted(::std::shared_ptr<::ImportResult> result, ::std::
string const& levelId);
185 MCAPI
void _openProcessWorldProgressDialog();
187 MCAPI ::Social::PermissionCheckResult _parentalControlsDialogCheck();
189 MCAPI
void _registerBindings();
191 MCAPI
void _setOwnershipVerificationAnimationVisibleState();
193 MCAPI
bool _shouldShowLockIcon(::LocalWorldInfo const& world) const;
195 MCAPI ::ui::ViewRequest _startLocalWorld(::LocalWorldInfo const& world);
197 MCAPI ::ui::ViewRequest _startNetworkWorld(::NetworkWorldInfo const& world, ::NetworkWorldType worldType);
199 MCAPI ::ui::DirtyFlag _tickRealms();
201 MCAPI
bool _updateFriendsTab();
203 MCAPI
void _updateNeedsOfflineAuthCode();
205 MCAPI
bool _userGeneratedContentRestrictionsDialogCheck() const;
207 MCAPI
bool _worldHasImage(::NetworkWorldType type,
int collectionIndex);
213 MCAPI static ::std::chrono::seconds& mFiveSecondInterval();
220 ::std::shared_ptr<::PlayScreenModel> model,
221 ::PlayScreenDefaultTab tab,
222 ::ui::ScreenTechStackSelector& screenTechStackSelector,
223 ::std::
string const& dirtyLevelId
236 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
238 MCAPI
void $onOpen();
240 MCAPI
void $onLeave();
242 MCAPI ::ui::DirtyFlag $handleGameEventNotification(::ui::GameEventNotification notification);
244 MCAPI ::ui::DirtyFlag $tick();
246 MCAPI ::std::
string $getAdditionalScreenInfo() const;
248 MCFOLD ::ui::SceneType $getSceneType() const;
250 MCFOLD ::std::
string $_getButtonADescription();
252 MCAPI
void $_registerEventHandlers();
Definition DlcChecker.h:5
Definition DlcUIWrapper.h:5
Definition MainMenuScreenController.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 PermissionCheckResult.h:7