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/services/clubs/ClubModel.h"
16#include "mc/world/level/storage/GameRules.h"
32namespace Realms {
struct Content; }
47 enum class PurchaseIntent :
int {
49 ManageSubscription = 1,
50 RenewSubscription = 2,
59 ::ll::TypedStorage<1, 1, bool> mRealmsSaveInProgress;
60 ::ll::TypedStorage<1, 1, bool> mClubsSaveInProgress;
61 ::ll::TypedStorage<1, 1, bool> mRealmsSaveSuccess;
68 using Version = ::Realms::ConfigInfo::Version;
73 ::ll::TypedStorage<4, 4, int> mPageIndex;
74 ::ll::TypedStorage<1, 1, bool> mAwaitingResponse;
75 ::ll::TypedStorage<8, 32, ::std::string> mPendingRef;
76 ::ll::TypedStorage<8, 32, ::std::string> mLastFilter;
77 ::ll::TypedStorage<8, 56, ::Realms::ConfigInfo> mConfigInfo;
78 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::ConfigInfo::Version>> mFilteredVersions;
79 ::ll::TypedStorage<8, 104, ::Realms::ConfigInfo::Version> mMatchingVersion;
87 ::ll::TypedStorage<8, 368, ::ModalScreenData> screenData;
88 ::ll::TypedStorage<8, 64, ::std::function<void(::ModalScreenButtonId)>> callback;
92 using PackContentItemPtr = ::std::shared_ptr<::PackContentItem>;
94 using ConstPackContentItemPtr = ::std::shared_ptr<::PackContentItem const>;
99 ::ll::TypedStorage<8, 80, ::std::mutex> mClubModelMutex;
100 ::ll::TypedStorage<8, 128, ::Clubs::ClubModel> mClubModel;
101 ::ll::TypedStorage<8, 128, ::Clubs::ClubModel> mUpdatedClubModel;
102 ::ll::TypedStorage<8, 720, ::Realms::World> mWorld;
103 ::ll::TypedStorage<8, 720, ::Realms::World> mUpdatedWorld;
104 ::ll::TypedStorage<8, 112, ::Realms::SubscriptionInfo> mSubscription;
105 ::ll::TypedStorage<1, 1, bool> mIsInitialWorldLoadComplete;
106 ::ll::TypedStorage<1, 1, bool> mRefreshWorldAndSubscriptionInfoOnOpen;
107 ::ll::TypedStorage<4, 4, ::RealmsSettingsScreenController::PurchaseIntent> mPurchaseIntent;
108 ::ll::TypedStorage<8, 32, ::std::string> mSelectedSectionTitle;
109 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RealmsAllowListScreenController>> mRealmsAllowListScreenController;
110 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ResourcePacksScreenController>> mBehaviorPacksScreenController;
111 ::ll::TypedStorage<4, 4, int> mActiveTabIndex;
112 ::ll::TypedStorage<1, 1, bool> mHasSubscriptionInfoBeenReceived;
113 ::ll::TypedStorage<1, 1, bool> mRefreshScreen;
114 ::ll::TypedStorage<1, 1, bool> mIsUploadingPacks;
115 ::ll::TypedStorage<1, 1, bool> mRealmsSelectedContentInitialized;
116 ::ll::TypedStorage<1, 1, bool> mDidReplaceWorld;
117 ::ll::TypedStorage<1, 1, bool> mRefreshingWorldInfo;
118 ::ll::TypedStorage<1, 1, bool> mScreenHasRefreshed;
119 ::ll::TypedStorage<1, 1, bool> mRealmDescriptionEdited;
120 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlatformMultiplayerRestrictions>> mPlatformMultiplayerRestrictions;
121 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
122 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
123 ::ll::TypedStorage<8, 8, ::Realms::ContentService&> mContentService;
124 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IContentManagerContext>> mContentManagerContext;
125 ::ll::TypedStorage<8, 8, ::MultiplayerLockState> mMultiplayerState;
126 ::ll::TypedStorage<8, 8, ::PackManagerContentSource*> mRealmContentSource;
127 ::ll::TypedStorage<8, 32, ::std::string> mInitialPackId;
128 ::ll::TypedStorage<8, 8, uint64> mLoadedItemsCount;
129 ::ll::TypedStorage<1, 3, ::RealmsSettingsScreenController::SaveStatusTracker> mSaveStatusTracker;
130 ::ll::TypedStorage<8, 32, ::std::string> mNewSlotWorldName;
131 ::ll::TypedStorage<1, 1, bool> mIsFetchingInviteLinkInfo;
132 ::ll::TypedStorage<1, 1, bool> mHasInviteLinkInfoErrored;
133 ::ll::TypedStorage<1, 1, bool> mIsPostingInviteLink;
134 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::InviteLink>> mInviteLinks;
135 ::ll::TypedStorage<1, 1, bool> mRefetchInviteLinksOnOpen;
136 ::ll::TypedStorage<1, 1, bool> mActiveDropdown;
137 ::ll::TypedStorage<4, 4, int> mRegionSelectedIndex;
138 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::ServerRegion>> mRegionData;
139 ::ll::TypedStorage<1, 1, bool> mIsFetchingPreferredRegions;
140 ::ll::TypedStorage<1, 1, bool> mHasPreferredRegionsErrored;
141 ::ll::TypedStorage<8, 256, ::RealmsSettingsScreenController::RealmsVersionState> mRealmsVersionState;
142 ::ll::TypedStorage<8, 24, ::std::vector<::RealmsSettingsScreenController::DelayedStandardModalScreenData>>
143 mDelayedStandardModalPopups;
144 ::ll::TypedStorage<4, 4, int> mPlayerSleepPercentInt;
145 ::ll::TypedStorage<8, 32, ::std::string> mRespawnRadiusString;
146 ::ll::TypedStorage<8, 32, ::std::string> mRandomTickSpeedString;
147 ::ll::TypedStorage<8, 192, ::GameRules> mGameRules;
148 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mTaskGroup;
153 RealmsSettingsScreenController& operator=(RealmsSettingsScreenController
const&);
154 RealmsSettingsScreenController(RealmsSettingsScreenController
const&);
155 RealmsSettingsScreenController();
160 virtual ~RealmsSettingsScreenController() =
default;
162 virtual void onOpen() ;
164 virtual void onCreation() ;
166 virtual ::ui::DirtyFlag tick() ;
168 virtual ::std::string getAdditionalScreenInfo() const ;
170 virtual
void addEventProperties(::std::unordered_map<::std::
string, ::std::
string>& eventProperties) const
177 MCNAPI RealmsSettingsScreenController(
179 ::Realms::World const& world,
180 ::
std::
string const& initialPackId
185 ::
std::shared_ptr<::
std::vector<::Realms::Content>> contentToApply,
187 ::
std::function<
void(::
std::vector<::Realms::Content>)> completeUploadCallback,
196 ::
std::
string const& title,
197 ::
std::
string const& message,
198 ::
std::function<
void(::ModalScreenButtonId)> callback,
199 ::
std::
string const& leftButtonLabel,
200 ::
std::
string const& middleButtonLabel,
201 ::
std::
string const& rightButtonLabel,
202 ::ModalScreenButtonMode buttonNumber,
203 ::
std::
string const& telemetryOverride
230 MCNAPI
void _saveSettings(
bool showRealmsLoadingLevelProgressHandler, ::
std::function<
void(
bool)> actionAfterSave);
234 ::
std::function<
bool()> enabledFunction
251 ::Realms::World const& world,
252 ::
std::
string const& initialPackId
Definition DlcUIWrapper.h:5
Definition IContentManagerContext.h:5
Definition IContentManager.h:5
Definition MainMenuScreenModel.h:5
Definition RealmsAllowListScreenController.h:5
Definition RealmsSettingsScreenController.h:5
MCAPI void _openCloseRealm(bool isRequestToOpen)
MCAPI void _applyPacks(::std::function< void()> packsApplyCallback)
MCAPI void _addContentToBeAppliedAndUploadIfNeeded(::std::vector<::std::shared_ptr<::PackContentItem > > contentToUpload, ::std::shared_ptr<::std::vector<::Realms::Content > > contentToApply, int index, ::std::function< void(::std::vector<::Realms::Content >)> completeUploadCallback, ::std::function< void(::std::vector<::std::shared_ptr<::PackContentItem > >, int)> failedUploadCallback)
MCAPI void _fetchInviteLinks()
MCAPI void activateInitialPack()
MCAPI void * $ctor(::std::shared_ptr<::MainMenuScreenModel > model, ::Realms::World const &world, ::std::string const &initialPackId)
MCAPI void _setUpCallbacksBooleanGameRuleSettings(::std::vector<::std::pair<::std::string, ::GameRuleId > > const &rules, ::std::function< bool()> enabledFunction)
MCAPI::std::string $getAdditionalScreenInfo() const
MCAPI void _querySubscriptionInfo()
MCAPI::ui::DirtyFlag $tick()
MCAPI bool _canChangeCheatGameRules() const
MCAPI bool _hasSlotInfoChanged()
MCAPI void _updateRealmBranchConfig(::std::string const &ref)
MCAPI void _updateVersionsModel(::std::string const &filter, bool forceUpdate)
MCAPI void _refreshWorldInfo(bool refreshSubscriptionInfo)
MCAPI void _fetchAppliedContent()
MCAPI bool _hasGameRulesChanged()
MCAPI void _showErrorPopup(::std::string titleId, ::std::string contentId, ::std::function< void(bool)> action)
MCAPI void _saveSettings(bool showRealmsLoadingLevelProgressHandler, ::std::function< void(bool)> actionAfterSave)
MCAPI void _displayModalPopup(::std::string const &title, ::std::string const &message, ::std::function< void(::ModalScreenButtonId)> callback, ::std::string const &leftButtonLabel, ::std::string const &middleButtonLabel, ::std::string const &rightButtonLabel, ::ModalScreenButtonMode buttonNumber, ::std::string const &telemetryOverride)
MCAPI bool _isStoreMismatch() const
MCAPI bool _hasWorldInfoChanged()
MCAPI void _registerEventHandlers()
MCAPI bool _hasSingleGameRuleChanged(::GameRuleId const &rule)
MCAPI void _renewRealmHandler()
MCAPI void $addEventProperties(::std::unordered_map<::std::string, ::std::string > &eventProperties) const
Definition ContentService.h:7
Definition ResourcePacksScreenController.h:5
Definition SettingsScreenControllerBase.h:5
Definition TaskGroup.h:85
Definition GameRuleId.h:8
Definition PackContentItem.h:5
Definition PackManagerContentSource.h:5
Definition RealmsSettingsScreenController.h:21
Definition RealmsSettingsScreenController.h:19
Definition RealmsSettingsScreenController.h:17
Definition InviteLink.h:7
Definition ServerRegion.h:7