LeviLamina
Loading...
Searching...
No Matches
RealmsCreateScreenController.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/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"
15
16// auto generated forward declare list
17// clang-format off
18class IEntitlementManager;
21struct ProductSku;
22struct Purchase;
23namespace Json { class Value; }
24// clang-format on
25
27public:
28 // RealmsCreateScreenController inner types define
29 enum class State : int {
30 Initial = 0,
31 Processing = 1,
32 Fail = 2,
33 Success = 3,
34 };
35
36public:
37 // member variables
38 // NOLINTBEGIN
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;
61 // NOLINTEND
62
63public:
64 // prevent constructor by default
65 RealmsCreateScreenController();
66
67public:
68 // virtual functions
69 // NOLINTBEGIN
70 virtual ~RealmsCreateScreenController() /*override*/;
71
72 virtual void onCreation() /*override*/;
73
74 virtual void onOpen() /*override*/;
75
76 virtual void onLeave() /*override*/;
77
78 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
79
80 virtual ::ui::DirtyFlag tick() /*override*/;
81 // NOLINTEND
82
83public:
84 // member functions
85 // NOLINTBEGIN
86 MCAPI RealmsCreateScreenController(
87 ::std::shared_ptr<::MainMenuScreenModel> model,
88 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entitlementManager,
89 ::RealmsCreateParams const& createParams,
90 bool isSubController,
91 ::ScreenExitBehavior exitBehavior
92 );
93
94 MCAPI void _checkUnfulfilledPurchase();
95
96 MCFOLD void _closePurchaseInProgress();
97
98 MCAPI void _errorDialogCreateRealmFail();
99
100 MCAPI void _errorDialogFailedConditions();
101
102 MCAPI void _errorDialogInvalidName(::std::string realmName, bool genericError);
103
104 MCAPI void _fulfillPriorRealmPurchase(::std::weak_ptr<::Purchase> purchase);
105
106 MCAPI ::ProductSku const& _getProductSku() const;
107
108 MCFOLD void _openPurchaseInProgress();
109
110 MCAPI void _playNowModalPopup(::std::function<void()> actionAfterCreate);
111
112 MCAPI void _promptForAutoFulfillment(::std::weak_ptr<::Purchase>& purchase);
113
114 MCAPI void _promptForIntentMismatchOverride(::std::string const& contentId);
115
116 MCAPI void _promptForUnknownIntentOverrideAndFulfillment(::std::weak_ptr<::Purchase>& purchase);
117
118 MCAPI void _promptForXuidOverrideAndFulfillment(::std::weak_ptr<::Purchase>& purchase);
119
120 MCAPI void _promptPrepareAppStore(::std::function<void(bool)> callback);
121
122 MCAPI void _purchaseRealm();
123
124 MCAPI void _registerBindings();
125
126 MCAPI void _registerEventHandlers();
127
128 MCAPI void _verifyAppStoreReady(::std::function<void()> readyCallback);
129 // NOLINTEND
130
131public:
132 // constructor thunks
133 // NOLINTBEGIN
134 MCAPI void* $ctor(
135 ::std::shared_ptr<::MainMenuScreenModel> model,
136 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entitlementManager,
137 ::RealmsCreateParams const& createParams,
138 bool isSubController,
139 ::ScreenExitBehavior exitBehavior
140 );
141 // NOLINTEND
142
143public:
144 // destructor thunk
145 // NOLINTBEGIN
146 MCAPI void $dtor();
147 // NOLINTEND
148
149public:
150 // virtual function thunks
151 // NOLINTBEGIN
152 MCAPI void $onCreation();
153
154 MCAPI void $onOpen();
155
156 MCAPI void $onLeave();
157
158 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
159
160 MCAPI ::ui::DirtyFlag $tick();
161 // NOLINTEND
162
163public:
164 // vftables
165 // NOLINTBEGIN
166 MCNAPI static void** $vftableForScreenController();
167
169 // NOLINTEND
170};
Definition Value.h:16
Definition MainMenuScreenController.h:5
Definition MainMenuScreenModel.h:5
Definition RealmsCreateParams.h:5
Definition RealmsCreateScreenController.h:5
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForScreenController()