3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/screens/controllers/MainMenuScreenController.h"
8#include "mc/client/gui/screens/controllers/ScreenExitBehavior.h"
9#include "mc/client/network/realms/World.h"
10#include "mc/client/store/iap/RealmsOfferPeriod.h"
11#include "mc/client/store/iap/RealmsOfferTier.h"
12#include "mc/client/store/iap/RealmsOfferType.h"
13#include "mc/client/store/iap/RealmsPurchaseIntent.h"
14#include "mc/deps/core/utility/NonOwnerPointer.h"
18class IEntitlementManager;
23namespace Json {
class Value; }
29 enum class State :
int {
39 ::ll::TypedStorage<1, 1, bool> mDirty;
40 ::ll::TypedStorage<1, 1, bool> mCheckedTOS;
41 ::ll::TypedStorage<1, 1, bool> mIsValidRealmName;
42 ::ll::TypedStorage<1, 1, bool> mCheckUnfulfilledPurchase;
43 ::ll::TypedStorage<1, 1, bool> mOverridePurchaseIntent;
44 ::ll::TypedStorage<1, 1, bool> mPurchaseInProgress;
45 ::ll::TypedStorage<8, 32, ::std::string> mRealmsPurchaseCorrelationId;
46 ::ll::TypedStorage<1, 1, bool const> mIsSubController;
47 ::ll::TypedStorage<4, 4, ::RealmsPurchaseIntent const> mPurchaseIntent;
48 ::ll::TypedStorage<8, 32, ::std::string> mWorldName;
49 ::ll::TypedStorage<8, 32, ::std::string> mSubscriptionId;
50 ::ll::TypedStorage<4, 4, ::RealmsOfferType const> mOfferType;
51 ::ll::TypedStorage<4, 4, ::RealmsOfferPeriod> mOfferPeriod;
52 ::ll::TypedStorage<4, 4, ::RealmsOfferTier> mOfferTier;
53 ::ll::TypedStorage<1, 1, bool> mPurchaseDisabledDueToStoreVersion;
54 ::ll::TypedStorage<1, 1, bool const> mTrialAvailable;
55 ::ll::TypedStorage<1, 1, bool const> mHasClub;
56 ::ll::TypedStorage<1, 1, bool const> mIsFromRealmsPDP;
57 ::ll::TypedStorage<8, 64, ::std::function<void()>> mActionAfterCreate;
58 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager>> mEntitlementManager;
59 ::ll::TypedStorage<8, 656, ::Realms::World> mNewWorld;
60 ::ll::TypedStorage<8, 64, ::std::function<void(::Realms::World&)>> mRealmCreatedCallback;
65 RealmsCreateScreenController();
70 virtual ~RealmsCreateScreenController() ;
72 virtual void onCreation() ;
74 virtual void onOpen() ;
76 virtual void onLeave() ;
78 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
80 virtual ::ui::DirtyFlag tick() ;
86 MCAPI RealmsCreateScreenController(
87 ::std::shared_ptr<::MainMenuScreenModel> model,
88 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entitlementManager,
89 ::RealmsCreateParams
const& createParams,
91 ::ScreenExitBehavior exitBehavior
94 MCAPI
void _checkUnfulfilledPurchase();
96 MCFOLD
void _closePurchaseInProgress();
98 MCAPI
void _errorDialogCreateRealmFail();
100 MCAPI
void _errorDialogFailedConditions();
102 MCAPI
void _errorDialogInvalidName(::std::string realmName,
bool genericError);
104 MCAPI
void _fulfillPriorRealmPurchase(::std::weak_ptr<::Purchase> purchase);
106 MCAPI ::ProductSku
const& _getProductSku()
const;
108 MCFOLD
void _openPurchaseInProgress();
110 MCAPI
void _playNowModalPopup(::std::function<
void()> actionAfterCreate);
112 MCAPI
void _promptForAutoFulfillment(::std::weak_ptr<::Purchase>& purchase);
114 MCAPI
void _promptForIntentMismatchOverride(::std::string
const& contentId);
116 MCAPI
void _promptForUnknownIntentOverrideAndFulfillment(::std::weak_ptr<::Purchase>& purchase);
118 MCAPI
void _promptForXuidOverrideAndFulfillment(::std::weak_ptr<::Purchase>& purchase);
120 MCAPI
void _promptPrepareAppStore(::std::function<
void(
bool)> callback);
122 MCAPI
void _purchaseRealm();
124 MCAPI
void _registerBindings();
126 MCAPI
void _registerEventHandlers();
128 MCAPI
void _verifyAppStoreReady(::std::function<
void()> readyCallback);
135 ::std::shared_ptr<::MainMenuScreenModel> model,
136 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entitlementManager,
137 ::RealmsCreateParams
const& createParams,
138 bool isSubController,
139 ::ScreenExitBehavior exitBehavior
152 MCAPI
void $onCreation();
154 MCAPI
void $onOpen();
156 MCAPI
void $onLeave();
158 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
160 MCAPI ::ui::DirtyFlag $tick();
Definition MainMenuScreenController.h:5
Definition MainMenuScreenModel.h:5
Definition RealmsCreateParams.h:5
Definition RealmsCreateScreenController.h:5
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForScreenController()