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"
36namespace Realms {
struct Content; }
52 enum class PurchaseIntent :
int {
54 ManageSubscription = 1,
55 RenewSubscription = 2,
60 enum class SaveType :
int {
66 enum class RealmsSaveAction :
int {
78 ::ll::TypedStorage<1, 1, bool> mRealmsSaveInProgress;
79 ::ll::TypedStorage<1, 1, bool> mClubsSaveInProgress;
80 ::ll::TypedStorage<1, 1, bool> mRealmsSaveSuccess;
87 using Version = ::Realms::ConfigInfo::Version;
92 ::ll::TypedStorage<4, 4, int> mPageIndex;
93 ::ll::TypedStorage<1, 1, bool> mAwaitingResponse;
94 ::ll::TypedStorage<8, 32, ::std::string> mPendingRef;
95 ::ll::TypedStorage<8, 32, ::std::string> mLastFilter;
96 ::ll::TypedStorage<8, 56, ::Realms::ConfigInfo> mConfigInfo;
97 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::ConfigInfo::Version>> mFilteredVersions;
98 ::ll::TypedStorage<8, 104, ::Realms::ConfigInfo::Version> mMatchingVersion;
104 MCAPI RealmsVersionState();
106 MCAPI ~RealmsVersionState();
126 ::ll::TypedStorage<8, 368, ::ModalScreenData> screenData;
127 ::ll::TypedStorage<8, 64, ::std::function<void(::ModalScreenButtonId)>> callback;
132 DelayedStandardModalScreenData& operator=(DelayedStandardModalScreenData
const&);
133 DelayedStandardModalScreenData(DelayedStandardModalScreenData
const&);
134 DelayedStandardModalScreenData();
139 MCAPI DelayedStandardModalScreenData(::RealmsSettingsScreenController::DelayedStandardModalScreenData&&);
141 MCAPI ~DelayedStandardModalScreenData();
147 MCAPI
void* $ctor(::RealmsSettingsScreenController::DelayedStandardModalScreenData&&);
157 using PackContentItemPtr = ::std::shared_ptr<::PackContentItem>;
159 using ConstPackContentItemPtr = ::std::shared_ptr<::PackContentItem const>;
164 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mClubModelMutex;
165 ::ll::TypedStorage<8, 128, ::Clubs::ClubModel> mClubModel;
166 ::ll::TypedStorage<8, 128, ::Clubs::ClubModel> mUpdatedClubModel;
167 ::ll::TypedStorage<8, 656, ::Realms::World> mWorld;
168 ::ll::TypedStorage<8, 656, ::Realms::World> mUpdatedWorld;
169 ::ll::TypedStorage<8, 80, ::Realms::SubscriptionInfo> mSubscription;
170 ::ll::TypedStorage<1, 1, bool> mIsInitialWorldLoadComplete;
171 ::ll::TypedStorage<1, 1, bool> mRefreshWorldAndSubscriptionInfoOnOpen;
172 ::ll::TypedStorage<4, 4, ::RealmsSettingsScreenController::PurchaseIntent> mPurchaseIntent;
173 ::ll::TypedStorage<8, 32, ::std::string> mSelectedSectionTitle;
174 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RealmsAllowListScreenController>> mRealmsAllowListScreenController;
175 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ResourcePacksScreenController>> mBehaviorPacksScreenController;
176 ::ll::TypedStorage<4, 4, int> mActiveTabIndex;
177 ::ll::TypedStorage<1, 1, bool> mIsSlotsScreen;
178 ::ll::TypedStorage<1, 1, bool> mHasSubscriptionInfoBeenReceived;
179 ::ll::TypedStorage<1, 1, bool> mRefreshScreen;
180 ::ll::TypedStorage<1, 1, bool> mIsUploadingPacks;
181 ::ll::TypedStorage<1, 1, bool> mRealmsSelectedContentInitialized;
182 ::ll::TypedStorage<1, 1, bool> mDidReplaceWorld;
183 ::ll::TypedStorage<1, 1, bool> mRefreshingWorldInfo;
184 ::ll::TypedStorage<1, 1, bool> mScreenHasRefreshed;
185 ::ll::TypedStorage<1, 1, bool> mRealmDescriptionEdited;
186 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlatformMultiplayerRestrictions>> mPlatformMultiplayerRestrictions;
187 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
188 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
189 ::ll::TypedStorage<8, 8, ::Realms::ContentService&> mContentService;
190 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IContentManagerContext>> mContentManagerContext;
191 ::ll::TypedStorage<8, 8, ::MultiplayerLockState> mMultiplayerState;
192 ::ll::TypedStorage<8, 8, ::PackManagerContentSource*> mRealmContentSource;
193 ::ll::TypedStorage<8, 32, ::std::string> mInitialPackId;
194 ::ll::TypedStorage<8, 8, uint64> mLoadedItemsCount;
195 ::ll::TypedStorage<1, 3, ::RealmsSettingsScreenController::SaveStatusTracker> mSaveStatusTracker;
196 ::ll::TypedStorage<8, 32, ::std::string> mNewSlotWorldName;
197 ::ll::TypedStorage<8, 64, ::Realms::WorldBackupList> mWorldBackupList;
198 ::ll::TypedStorage<1, 1, bool> mDidWorldBackupListReceiveNetworkError;
199 ::ll::TypedStorage<1, 1, bool> mHasLoadedWorldBackupList;
200 ::ll::TypedStorage<1, 1, bool> mHasLoadedActiveWorldSize;
201 ::ll::TypedStorage<1, 1, bool> mDidFetchActiveWorldSizeReceiveError;
202 ::ll::TypedStorage<4, 4, float> mStorageTotal;
203 ::ll::TypedStorage<4, 4, float> mStorageUsed;
204 ::ll::TypedStorage<8, 8, int64> mActiveWorldSizeBytes;
205 ::ll::TypedStorage<8, 32, ::std::vector<bool>> mManualSavesToggleStates;
206 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mBackupIdsToOverwrite;
207 ::ll::TypedStorage<4, 4, int> mActiveSavesTabIndex;
208 ::ll::TypedStorage<4, 4, int> mSelectedSaveIndex;
209 ::ll::TypedStorage<8, 32, ::std::string> mSelectedBackupId;
210 ::ll::TypedStorage<4, 4, ::RealmsSettingsScreenController::RealmsSaveAction> mLastSaveAction;
211 ::ll::TypedStorage<4, 8, ::std::optional<::RealmsSettingsScreenController::RealmsSaveAction>> mSaveAction;
212 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mBackupsToReplace;
213 ::ll::TypedStorage<8, 32, ::std::string> mLastFocusIdBeforeModalOpen;
214 ::ll::TypedStorage<1, 1, bool> mIsFetchingInviteLinkInfo;
215 ::ll::TypedStorage<1, 1, bool> mHasInviteLinkInfoErrored;
216 ::ll::TypedStorage<1, 1, bool> mIsPostingInviteLink;
217 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::InviteLink>> mInviteLinks;
218 ::ll::TypedStorage<1, 1, bool> mRefetchInviteLinksOnOpen;
219 ::ll::TypedStorage<1, 1, bool> mActiveDropdown;
220 ::ll::TypedStorage<4, 4, int> mRegionSelectedIndex;
221 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::ServerRegion>> mRegionData;
222 ::ll::TypedStorage<1, 1, bool> mIsFetchingPreferredRegions;
223 ::ll::TypedStorage<1, 1, bool> mHasPreferredRegionsErrored;
224 ::ll::TypedStorage<8, 256, ::RealmsSettingsScreenController::RealmsVersionState> mRealmsVersionState;
225 ::ll::TypedStorage<8, 24, ::std::vector<::RealmsSettingsScreenController::DelayedStandardModalScreenData>>
226 mDelayedStandardModalPopups;
227 ::ll::TypedStorage<4, 4, int> mPlayerSleepPercentInt;
228 ::ll::TypedStorage<8, 32, ::std::string> mRespawnRadiusString;
229 ::ll::TypedStorage<8, 32, ::std::string> mRandomTickSpeedString;
230 ::ll::TypedStorage<8, 192, ::GameRules> mGameRules;
235 RealmsSettingsScreenController& operator=(RealmsSettingsScreenController
const&);
236 RealmsSettingsScreenController(RealmsSettingsScreenController
const&);
237 RealmsSettingsScreenController();
242 virtual ~RealmsSettingsScreenController() ;
244 virtual void onOpen() ;
246 virtual void onCreation() ;
248 virtual ::ui::DirtyFlag tick() ;
250 virtual ::std::string getAdditionalScreenInfo() const ;
252 virtual
void addEventProperties(::std::unordered_map<::std::
string, ::std::
string>& eventProperties) const
259 MCAPI RealmsSettingsScreenController(
260 ::std::shared_ptr<::MainMenuScreenModel> model,
261 ::Realms::World const& world,
262 ::std::
string const& initialPackId
265 MCAPI
void _addContentToBeAppliedAndUploadIfNeeded(
266 ::std::vector<::std::shared_ptr<::PackContentItem>> contentToUpload,
267 ::std::shared_ptr<::std::vector<::Realms::Content>> contentToApply,
269 ::std::function<
void(::std::vector<::Realms::Content>)> completeUploadCallback,
270 ::std::function<
void(::std::vector<::std::shared_ptr<::PackContentItem>>,
int)> failedUploadCallback
273 MCAPI
void _addInviteLink();
275 MCAPI
void _applyPacks(::std::function<
void()> packsApplyCallback);
277 MCAPI
bool _canChangeCheatGameRules() const;
279 MCAPI
bool _checkMultiplayerPrivileges();
281 MCAPI
void _clearRealmsContentSelected();
283 MCAPI
void _confirmCloseRealm();
285 MCAPI
void _confirmResetRealm();
287 MCAPI
bool _contentNeedApplication(::std::vector<::std::shared_ptr<::PackContentItem>> const& selectedContent);
289 MCAPI ::std::function<
void(::std::vector<::Realms::Content>)>
290 _createApplyContentOnRealmProgressCallbackChain(::std::function<
void()> packApplyCallback);
292 MCAPI ::std::unique_ptr<::Pack> _createUnknownPack(::Realms::Content const& content, ::PackType packType);
294 MCAPI
void _deleteBackup();
296 MCAPI
void _displayDelayedStandardModalPopups();
298 MCAPI
void _displayFreeUpSpacePopup();
300 MCAPI
void _displayModalPopup(
301 ::std::
string const& title,
302 ::std::
string const& message,
303 ::std::function<
void(
bool)> callback,
304 ::std::
string const& leftButtonLabel,
305 ::std::
string const& middleButtonLabel,
306 ::std::
string const& rightButtonLabel,
307 ::ModalScreenButtonMode buttonNumber,
308 ::std::
string const& telemetryOverride
311 MCAPI
void _displayModalPopup(
312 ::std::
string const& title,
313 ::std::
string const& message,
314 ::std::function<
void(::ModalScreenButtonId)> callback,
315 ::std::
string const& leftButtonLabel,
316 ::std::
string const& middleButtonLabel,
317 ::std::
string const& rightButtonLabel,
318 ::ModalScreenButtonMode buttonNumber,
319 ::std::
string const& telemetryOverride
322 MCAPI
void _downloadMostRecentBackup();
324 MCAPI
void _downloadRealmsBackupInContext();
326 MCAPI
void _downloadRealmsWorld(
327 uint64 estimatedSize,
328 ::std::
string const& backupId,
329 ::std::
string const& time,
330 bool shouldCheckForSettingsChanged
333 MCAPI
void _fetchActiveWorldSize();
335 MCAPI
void _fetchAppliedContent();
337 MCAPI
void _fetchInviteLinks();
339 MCAPI
void _fetchWorldBackupList();
341 MCAPI ::std::vector<::std::shared_ptr<::PackContentItem>> _gatherSelectedContent();
343 MCAPI ::std::
string _getConsumableToSubscriptionInfoText();
345 MCAPI ::std::
string _getCurrentRealmsVersionReference();
347 MCAPI ::std::
string _getDurationLabelText();
349 MCAPI ::std::
string _getMaxPlayerLabelText();
351 MCAPI ::std::
string _getPageLabel() const;
353 MCAPI
void _getPreferredRegions();
355 MCAPI ::std::
string _getRealmsVersionBranchName(
int slot);
357 MCAPI ::std::
string _getRealmsVersionReferenceId(
int slot);
359 MCAPI ::std::
string _getSubscriptionAddendumLabelText() const;
361 MCAPI ::std::
string _getSubscriptionOriginMismatchLabelText();
363 MCAPI
void _goToManageSubscriptionLink();
365 MCAPI
void _handleRealmBranchButtonClick(::UIPropertyBag& bag);
367 MCAPI
void _handleRealmInviteLinkButtonClick(::UIPropertyBag& bag);
369 MCAPI
bool _hasGameRulesChanged();
371 MCAPI
bool _hasSlotInfoChanged();
373 MCAPI
bool _hasWorldInfoChanged();
375 MCAPI
bool _isStoreMismatch() const;
377 MCAPI
void _openCloseRealm(
bool isRequestToOpen);
379 MCAPI
void _queryRealmsConfigInfo();
381 MCAPI
void _querySubscriptionInfo();
383 MCAPI
bool _randomTickSpeedHelper(::std::
string const& optionValue);
385 MCAPI
void _refreshRealmsConfigDetails(::Realms::ConfigInfo& realmsConfigInfo);
387 MCAPI
void _refreshWorldInfo(
bool refreshSubscriptionInfo);
389 MCAPI
void _registerBindings();
391 MCAPI
void _registerEventHandlers();
393 MCAPI
void _removeUnneededItemsFromRealmsUnknownContentSource();
395 MCAPI
void _renewRealmHandler();
397 MCAPI
void _resetRealm();
399 MCAPI
bool _respawnRadiusHelper(::std::
string const& optionValue);
401 MCAPI
void _restoreBackup();
403 MCAPI
void _saveAutoRealmWorldBackup();
405 MCAPI
void _saveClubInfo();
407 MCAPI
void _saveRealmWorldBackup();
409 MCAPI
void _saveSettings(
bool actionAfterSave, ::std::function<
void(
bool)>);
411 MCAPI
void _saveSettingsAndExitScreen();
413 MCAPI
void _setAllowCheatsWithConfirmation(
bool value);
415 MCAPI
void _setGameModeWithConfirmation(
int value);
417 MCAPI
void _setIsHardcore(
bool isHardcore);
419 MCAPI
void _setRealmsContentSelected();
421 MCAPI
void _setUpCallbacksBooleanGameRuleSettings(
422 ::std::vector<::std::pair<::std::
string, ::GameRuleId>> const& rules,
423 ::std::function<
bool()> enabledFunction
426 MCAPI
void _setupPacksScreen();
428 MCAPI
void _showErrorPopup(::std::
string titleId, ::std::
string contentId, ::std::function<
void(
bool)> action);
430 MCAPI
void _showErrorPopupAndExitScreenAfterDismissed(::std::
string titleId, ::std::
string contentId);
432 MCAPI
void _showRefreshWorldInfoPopup();
434 MCAPI
void _showSaveAndDeletePopup(
int deleteQty);
436 MCAPI
void _showSuccessPopup();
438 MCAPI
void _updateRealmBranchConfig(::std::
string const& ref);
440 MCAPI
void _updateSubscriptionInformation(::Realms::SubscriptionInfo subscription);
442 MCAPI
void _updateVersionsModel(::std::
string const& filter,
bool forceUpdate);
444 MCAPI
void _updateWorld(::Realms::World& world);
446 MCAPI
void _uploadWorld();
448 MCAPI
void activateInitialPack();
450 MCAPI ::Realms::World const& getWorld() const;
456 MCAPI static ::std::
string
457 _getDateAsFormattedStringForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
459 MCAPI static ::std::
string
460 _getGameServerVersionForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
462 MCAPI static ::std::
string
463 _getPacksListTextForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
465 MCAPI static ::std::
string _getSizeForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
467 MCAPI static ::std::
string
468 _getTimeAsFormattedStringForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
470 MCAPI static ::std::
string
471 _getWorldNameForBackupByIndex(::std::vector<::Realms::WorldBackup> const& backups,
int index);
477 MCAPI static ::std::
string const& DEFAULT_SAVES_TAB_FOCUS();
479 MCAPI static ::std::
string const& SAVES_BUTTON_FOCUS_CONTROL();
486 ::std::shared_ptr<::MainMenuScreenModel> model,
487 ::Realms::World const& world,
488 ::std::
string const& initialPackId
501 MCAPI
void $onOpen();
503 MCAPI
void $onCreation();
505 MCAPI ::ui::DirtyFlag $tick();
507 MCAPI ::std::
string $getAdditionalScreenInfo() const;
509 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 UIPropertyBag.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