38 mValueChangedPublisher;
44 mInputModeChangedPublisher;
56 ::ll::TypedStorage<8, 32, ::std::string> mSaveTag;
57 ::ll::TypedStorage<8, 32, ::std::string> mTelemetryProperty;
59 ::ll::TypedStorage<1, 4, ::Social::Events::PrivacyTagEnterprise> mTelemetryTag;
60 ::ll::TypedStorage<1, 4, ::OptionID const> mID;
62 ::ll::TypedStorage<1, 1, ::Social::Events::PrivacyTagEnterprise> mTelemetryTag;
63 ::ll::TypedStorage<4, 4, ::OptionID const> mID;
65 ::ll::TypedStorage<4, 4, ::OptionOwnerType const> mOwnerType;
66 ::ll::TypedStorage<4, 4, ::OptionType> mOptionType;
67 ::ll::TypedStorage<8, 32, ::std::string const> mCaptionId;
68 ::ll::TypedStorage<8, 56, ::GameVersion> mDefaultVersion;
69 ::ll::TypedStorage<4, 4, ::OptionResetFlags const> mOptionResetFlags;
70 ::ll::TypedStorage<8, 8, ::Option*> mOverrideSource;
71 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOverrideSourceValueChangedSubscription;
72 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOverrideSourceInputModeChangedSubscription;
73 ::ll::TypedStorage<8, 64, ::std::function<void(
bool)>> mRequestSaveCallback;
93 using BoolFilter = ::std::function<bool(
bool)>;
95 using SaveIntCallback = ::std::function<int(
int)>;
97 using StringFilter = ::std::function<::std::string(::std::string
const&)>;
102 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Option::Impl>> mImpl;
116 virtual ~Option() =
default;
121 virtual void save(::std::vector<::std::pair<::std::string, ::std::string>>& propertyVector) = 0;
123 virtual void load(::std::string
const& valueString) = 0;
125 virtual void load(::std::map<::std::string, ::std::string>& propertyMap);
136 ::OptionOwnerType ownerType,
137 ::OptionResetFlags resetFlags,
138 ::std::string
const& captionId,
139 ::std::string
const& saveTag,
140 ::OptionType optionType,
144 MCAPI
void _resetOption(::InputMode inputMode,
bool saveOptionChange);
146 MCAPI
void _updatePropertyVector(
147 ::std::vector<::std::pair<::std::string, ::std::string>>& propertyVector,
148 ::std::string
const& value
151 MCAPI
bool canModify()
const;
153 MCAPI
bool isDefaultValue(::InputMode inputMode)
const;
157 MCAPI ::Bedrock::PubSub::Subscription registerLock(::std::function<
void(
bool&)> isModifiableCondition);
159 MCAPI ::Bedrock::PubSub::Subscription
160 registerObserver(::std::function<
void(::Option
const&)> onValueChangedCallback);
162 MCAPI
void setCoerceSaveValueCallback(::std::function<
int(
int)> callback);
164 MCAPI
void setCoerceValueCallback(::std::function<::std::string(::std::string
const&)> f);
166 MCAPI
void setCoerceValueCallback(::std::function<
bool(
bool)> f);
168 MCAPI
void setOverrideSource(::Option* overrideSource);
178 MCAPI
static bool read(::std::string
const& valueString,
int& output);
180 MCAPI
static bool read(::std::string
const& valueString,
float& output);
182 MCAPI
static bool read(::std::string
const& valueString,
bool& output);
192 ::OptionOwnerType ownerType,
193 ::OptionResetFlags resetFlags,
194 ::std::string
const& captionId,
195 ::std::string
const& saveTag,
196 ::OptionType optionType,
213 MCAPI
void $load(::std::map<::std::string, ::std::string>& propertyMap);