3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/screens/controllers/ModalScreenButtonId.h"
8#include "mc/client/gui/screens/controllers/ModalScreenButtonMode.h"
9#include "mc/client/gui/screens/controllers/ModalScreenData.h"
10#include "mc/client/gui/screens/controllers/MultiplayerLockState.h"
11#include "mc/client/gui/screens/controllers/SettingsScreenControllerBase.h"
12#include "mc/client/network/realms/ConfigInfo.h"
13#include "mc/client/network/realms/SubscriptionInfo.h"
14#include "mc/client/network/realms/World.h"
15#include "mc/client/network/realms/WorldBackupList.h"
16#include "mc/client/services/clubs/ClubModel.h"
17#include "mc/deps/core/resource/PackType.h"
18#include "mc/platform/threading/Mutex.h"
19#include "mc/world/level/storage/GameRules.h"
35namespace Realms {
struct Content; }
51 enum class PurchaseIntent :
int {
53 ManageSubscription = 1,
54 RenewSubscription = 2,
59 enum class SaveType :
int {
65 enum class RealmsSaveAction :
int {
77 ::ll::TypedStorage<1, 1, bool> mRealmsSaveInProgress;
78 ::ll::TypedStorage<1, 1, bool> mClubsSaveInProgress;
79 ::ll::TypedStorage<1, 1, bool> mRealmsSaveSuccess;
86 using Version = ::Realms::ConfigInfo::Version;
91 ::ll::TypedStorage<4, 4, int> mPageIndex;
92 ::ll::TypedStorage<1, 1, bool> mAwaitingResponse;
93 ::ll::TypedStorage<8, 32, ::std::string> mPendingRef;
94 ::ll::TypedStorage<8, 32, ::std::string> mLastFilter;
95 ::ll::TypedStorage<8, 56, ::Realms::ConfigInfo> mConfigInfo;
96 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::ConfigInfo::Version>> mFilteredVersions;
97 ::ll::TypedStorage<8, 104, ::Realms::ConfigInfo::Version> mMatchingVersion;
103 MCAPI ~RealmsVersionState();
117 ::ll::TypedStorage<8, 368, ::ModalScreenData> screenData;
118 ::ll::TypedStorage<8, 64, ::std::function<void(::ModalScreenButtonId)>> callback;
124 MCAPI ~DelayedStandardModalScreenData();
134 using PackContentItemPtr = ::std::shared_ptr<::PackContentItem>;
136 using ConstPackContentItemPtr = ::std::shared_ptr<::PackContentItem const>;
141 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mClubModelMutex;
142 ::ll::TypedStorage<8, 128, ::Clubs::ClubModel> mClubModel;
143 ::ll::TypedStorage<8, 128, ::Clubs::ClubModel> mUpdatedClubModel;
144 ::ll::TypedStorage<8, 656, ::Realms::World> mWorld;
145 ::ll::TypedStorage<8, 656, ::Realms::World> mUpdatedWorld;
146 ::ll::TypedStorage<8, 80, ::Realms::SubscriptionInfo> mSubscription;
147 ::ll::TypedStorage<1, 1, bool> mIsInitialWorldLoadComplete;
148 ::ll::TypedStorage<1, 1, bool> mRefreshWorldAndSubscriptionInfoOnOpen;
149 ::ll::TypedStorage<4, 4, ::RealmsSettingsScreenController::PurchaseIntent> mPurchaseIntent;
150 ::ll::TypedStorage<8, 32, ::std::string> mSelectedSectionTitle;
151 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RealmsAllowListScreenController>> mRealmsAllowListScreenController;
152 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ResourcePacksScreenController>> mBehaviorPacksScreenController;
153 ::ll::TypedStorage<4, 4, int> mActiveTabIndex;
154 ::ll::TypedStorage<1, 1, bool> mIsSlotsScreen;
155 ::ll::TypedStorage<1, 1, bool> mHasSubscriptionInfoBeenReceived;
156 ::ll::TypedStorage<1, 1, bool> mRefreshScreen;
157 ::ll::TypedStorage<1, 1, bool> mIsUploadingPacks;
158 ::ll::TypedStorage<1, 1, bool> mRealmsSelectedContentInitialized;
159 ::ll::TypedStorage<1, 1, bool> mDidReplaceWorld;
160 ::ll::TypedStorage<1, 1, bool> mRefreshingWorldInfo;
161 ::ll::TypedStorage<1, 1, bool> mScreenHasRefreshed;
162 ::ll::TypedStorage<1, 1, bool> mRealmDescriptionEdited;
163 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlatformMultiplayerRestrictions>> mPlatformMultiplayerRestrictions;
164 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
165 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
166 ::ll::TypedStorage<8, 8, ::Realms::ContentService&> mContentService;
167 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IContentManagerContext>> mContentManagerContext;
168 ::ll::TypedStorage<8, 8, ::MultiplayerLockState> mMultiplayerState;
169 ::ll::TypedStorage<8, 8, ::PackManagerContentSource*> mRealmContentSource;
170 ::ll::TypedStorage<8, 32, ::std::string> mInitialPackId;
171 ::ll::TypedStorage<8, 8, uint64> mLoadedItemsCount;
172 ::ll::TypedStorage<1, 3, ::RealmsSettingsScreenController::SaveStatusTracker> mSaveStatusTracker;
173 ::ll::TypedStorage<8, 32, ::std::string> mNewSlotWorldName;
174 ::ll::TypedStorage<8, 64, ::Realms::WorldBackupList> mWorldBackupList;
175 ::ll::TypedStorage<1, 1, bool> mDidWorldBackupListReceiveNetworkError;
176 ::ll::TypedStorage<1, 1, bool> mHasLoadedWorldBackupList;
177 ::ll::TypedStorage<1, 1, bool> mHasLoadedActiveWorldSize;
178 ::ll::TypedStorage<1, 1, bool> mDidFetchActiveWorldSizeReceiveError;
179 ::ll::TypedStorage<4, 4, float> mStorageTotal;
180 ::ll::TypedStorage<4, 4, float> mStorageUsed;
181 ::ll::TypedStorage<8, 8, int64> mActiveWorldSizeBytes;
182 ::ll::TypedStorage<8, 32, ::std::vector<bool>> mManualSavesToggleStates;
183 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mBackupIdsToOverwrite;
184 ::ll::TypedStorage<4, 4, int> mActiveSavesTabIndex;
185 ::ll::TypedStorage<4, 4, int> mSelectedSaveIndex;
186 ::ll::TypedStorage<8, 32, ::std::string> mSelectedBackupId;
187 ::ll::TypedStorage<4, 4, ::RealmsSettingsScreenController::RealmsSaveAction> mLastSaveAction;
188 ::ll::TypedStorage<4, 8, ::std::optional<::RealmsSettingsScreenController::RealmsSaveAction>> mSaveAction;
189 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mBackupsToReplace;
190 ::ll::TypedStorage<8, 32, ::std::string> mLastFocusIdBeforeModalOpen;
191 ::ll::TypedStorage<1, 1, bool> mIsFetchingInviteLinkInfo;
192 ::ll::TypedStorage<1, 1, bool> mHasInviteLinkInfoErrored;
193 ::ll::TypedStorage<1, 1, bool> mIsPostingInviteLink;
194 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::InviteLink>> mInviteLinks;
195 ::ll::TypedStorage<1, 1, bool> mRefetchInviteLinksOnOpen;
196 ::ll::TypedStorage<1, 1, bool> mActiveDropdown;
197 ::ll::TypedStorage<4, 4, int> mRegionSelectedIndex;
198 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::ServerRegion>> mRegionData;
199 ::ll::TypedStorage<1, 1, bool> mIsFetchingPreferredRegions;
200 ::ll::TypedStorage<1, 1, bool> mHasPreferredRegionsErrored;
201 ::ll::TypedStorage<8, 256, ::RealmsSettingsScreenController::RealmsVersionState> mRealmsVersionState;
202 ::ll::TypedStorage<8, 24, ::std::vector<::RealmsSettingsScreenController::DelayedStandardModalScreenData>>
203 mDelayedStandardModalPopups;
204 ::ll::TypedStorage<4, 4, int> mPlayerSleepPercentInt;
205 ::ll::TypedStorage<8, 32, ::std::string> mRespawnRadiusString;
206 ::ll::TypedStorage<8, 32, ::std::string> mRandomTickSpeedString;
207 ::ll::TypedStorage<8, 192, ::GameRules> mGameRules;
212 RealmsSettingsScreenController& operator=(RealmsSettingsScreenController
const&);
213 RealmsSettingsScreenController(RealmsSettingsScreenController
const&);
214 RealmsSettingsScreenController();
219 virtual ~RealmsSettingsScreenController() ;
221 virtual void onOpen() ;
223 virtual void onCreation() ;
225 virtual ::ui::DirtyFlag tick() ;
227 virtual ::std::string getAdditionalScreenInfo() const ;
229 virtual
void addEventProperties(::std::unordered_map<::std::
string, ::std::
string>& eventProperties) const
236 MCAPI RealmsSettingsScreenController(
237 ::std::shared_ptr<::MainMenuScreenModel> model,
238 ::Realms::World const& world,
239 ::std::
string const& initialPackId
242 MCAPI
void _addContentToBeAppliedAndUploadIfNeeded(
243 ::std::vector<::std::shared_ptr<::PackContentItem>> contentToUpload,
244 ::std::shared_ptr<::std::vector<::Realms::Content>> contentToApply,
246 ::std::function<
void(::std::vector<::Realms::Content>)> completeUploadCallback,
247 ::std::function<
void(::std::vector<::std::shared_ptr<::PackContentItem>>,
int)> failedUploadCallback
250 MCAPI
void _addInviteLink();
252 MCAPI
void _applyPacks(::std::function<
void()> packsApplyCallback);
254 MCAPI
bool _checkMultiplayerPrivileges();
256 MCAPI
void _confirmCloseRealm();
258 MCAPI
void _confirmResetRealm();
260 MCAPI
bool _contentNeedApplication(::std::vector<::std::shared_ptr<::PackContentItem>> const& selectedContent);
262 MCAPI ::std::function<
void(::std::vector<::Realms::Content>)>
263 _createApplyContentOnRealmProgressCallbackChain(::std::function<
void()> packApplyCallback);
265 MCAPI ::std::unique_ptr<::Pack> _createUnknownPack(::Realms::Content const& content, ::PackType packType);
267 MCAPI
void _deleteBackup();
269 MCAPI
void _displayFreeUpSpacePopup();
271 MCAPI
void _displayModalPopup(
272 ::std::
string const& title,
273 ::std::
string const& message,
274 ::std::function<
void(
bool)> callback,
275 ::std::
string const& leftButtonLabel,
276 ::std::
string const& middleButtonLabel,
277 ::std::
string const& rightButtonLabel,
278 ::ModalScreenButtonMode buttonNumber,
279 ::std::
string const& telemetryOverride
282 MCAPI
void _displayModalPopup(
283 ::std::
string const& title,
284 ::std::
string const& message,
285 ::std::function<
void(::ModalScreenButtonId)> callback,
286 ::std::
string const& leftButtonLabel,
287 ::std::
string const& middleButtonLabel,
288 ::std::
string const& rightButtonLabel,
289 ::ModalScreenButtonMode buttonNumber,
290 ::std::
string const& telemetryOverride
293 MCAPI
void _downloadMostRecentBackup();
295 MCAPI
void _downloadRealmsBackupInContext();
297 MCAPI
void _downloadRealmsWorld(
298 uint64 estimatedSize,
299 ::std::
string const& backupId,
300 ::std::
string const& time,
301 bool shouldCheckForSettingsChanged
304 MCAPI
void _fetchActiveWorldSize();
306 MCAPI
void _fetchAppliedContent();
308 MCAPI
void _fetchInviteLinks();
310 MCAPI
void _fetchWorldBackupList();
312 MCAPI ::std::vector<::std::shared_ptr<::PackContentItem>> _gatherSelectedContent();
314 MCAPI ::std::
string _getConsumableToSubscriptionInfoText();
316 MCAPI ::std::
string _getCurrentRealmsVersionReference();
318 MCAPI ::std::
string _getDurationLabelText();
320 MCAPI ::std::
string _getMaxPlayerLabelText();
322 MCAPI
void _getPreferredRegions();
324 MCAPI ::std::
string _getSubscriptionOriginMismatchLabelText();
326 MCAPI
void _goToManageSubscriptionLink();
328 MCAPI
bool _hasClubInfoChanged() const;
330 MCAPI
bool _hasGameRulesChanged();
332 MCAPI
bool _hasSettingsChangePermission() const;
334 MCAPI
bool _hasSlotInfoChanged();
336 MCAPI
bool _hasWorldInfoChanged();
338 MCAPI
bool _isStoreMismatch() const;
340 MCAPI
void _openCloseRealm(
bool isRequestToOpen);
342 MCAPI
void _queryRealmsConfigInfo();
344 MCAPI
void _querySubscriptionInfo();
346 MCAPI
bool _randomTickSpeedHelper(::std::
string const& optionValue);
348 MCAPI
void _refreshRealmsConfigDetails(::Realms::ConfigInfo& realmsConfigInfo);
350 MCAPI
void _refreshWorldInfo(
bool refreshSubscriptionInfo);
352 MCAPI
void _registerBindings();
354 MCAPI
void _registerEventHandlers();
356 MCAPI
void _removeUnneededItemsFromRealmsUnknownContentSource();
358 MCAPI
void _renewRealmHandler();
360 MCAPI
void _resetRealm();
362 MCAPI
bool _respawnRadiusHelper(::std::
string const& optionValue);
364 MCAPI
void _restoreBackup();
366 MCAPI
void _saveAutoRealmWorldBackup();
368 MCAPI
void _saveClubInfo();
370 MCAPI
void _saveRealmWorldBackup();
372 MCAPI
void _saveSettings(
bool showRealmsLoadingLevelProgressHandler, ::std::function<
void(
bool)> actionAfterSave);
374 MCAPI
void _saveSettingsAndExitScreen();
376 MCAPI
void _setAllowCheatsWithConfirmation(
bool value);
378 MCAPI
void _setFocusToLastIdBeforeModalOpen();
380 MCAPI
void _setGameModeWithConfirmation(
int value);
382 MCAPI
void _setGameRule(
int value, ::GameRuleId gameRuleId);
384 MCAPI
void _setIsHardcore(
bool isHardcore);
386 MCAPI
void _setRandomTickSpeedString(::std::
string const& value);
388 MCAPI
void _setRealmsContentSelected();
390 MCAPI
void _setUpCallbacksBooleanGameRuleSettings(
391 ::std::vector<::std::pair<::std::
string, ::GameRuleId>> const& rules,
392 ::std::function<
bool()> enabledFunction
395 MCAPI
void _setupPacksScreen();
397 MCAPI
void _showErrorPopup(::std::
string titleId, ::std::
string contentId, ::std::function<
void(
bool)> action);
399 MCAPI
void _showErrorPopupAndExitScreenAfterDismissed(::std::
string titleId, ::std::
string contentId);
401 MCAPI
void _showRefreshWorldInfoPopup();
403 MCAPI
void _showSaveAndDeletePopup(
int deleteQty);
405 MCAPI
void _showSuccessPopup();
407 MCAPI
void _updateRealmBranchConfig(::std::
string const& ref);
409 MCAPI
void _updateSubscriptionInformation(::Realms::SubscriptionInfo subscription);
411 MCAPI
void _updateVersionsModel(::std::
string const& filter,
bool forceUpdate);
413 MCAPI
void _updateWorld(::Realms::World& world);
415 MCAPI
void _uploadWorld();
417 MCAPI
void showGeneralErrorPopupAndExitScreenAfterDismissed();
423 MCAPI static ::std::
string
424 _getDateAsFormattedStringForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
426 MCAPI static ::std::
string
427 _getGameServerVersionForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
429 MCAPI static ::std::
string
430 _getPacksListTextForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
432 MCAPI static ::std::
string _getSizeForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
434 MCAPI static ::std::
string
435 _getTimeAsFormattedStringForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
441 MCAPI static ::std::
string const& DEFAULT_SAVES_TAB_FOCUS();
443 MCAPI static ::std::
string const& SAVES_BUTTON_FOCUS_CONTROL();
450 ::std::shared_ptr<::MainMenuScreenModel> model,
451 ::Realms::World const& world,
452 ::std::
string const& initialPackId
465 MCAPI
void $onOpen();
467 MCAPI
void $onCreation();
469 MCAPI ::ui::DirtyFlag $tick();
471 MCAPI ::std::
string $getAdditionalScreenInfo() const;
473 MCAPI
void $addEventProperties(::std::unordered_map<::std::
string, ::std::
string>& eventProperties) const;
Definition DlcUIWrapper.h:5
Definition IContentManagerContext.h:5
Definition IContentManager.h:5
Definition MainMenuScreenModel.h:5
Definition RealmsAllowListScreenController.h:5
Definition RealmsSettingsScreenController.h:5
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition ContentService.h:7
Definition ResourcePacksScreenController.h:5
Definition SettingsScreenControllerBase.h:5
Definition GameRuleId.h:8
Definition PackContentItem.h:5
Definition PackManagerContentSource.h:5
Definition RealmsSettingsScreenController.h:25
Definition RealmsSettingsScreenController.h:23
Definition RealmsSettingsScreenController.h:21
Definition InviteLink.h:7
Definition ServerRegion.h:7
Definition WorldBackup.h:7