38 mValueChangedPublisher;
44 mInputModeChangedPublisher;
51 ::ll::TypedStorage<8, 32, ::std::string> mSaveTag;
52 ::ll::TypedStorage<8, 32, ::std::string> mTelemetryProperty;
53 ::ll::TypedStorage<1, 1, ::Social::Events::PrivacyTagEnterprise> mTelemetryTag;
54 ::ll::TypedStorage<4, 4, ::OptionID const> mID;
55 ::ll::TypedStorage<4, 4, ::OptionOwnerType const> mOwnerType;
56 ::ll::TypedStorage<4, 4, ::OptionType> mOptionType;
57 ::ll::TypedStorage<8, 32, ::std::string const> mCaptionId;
58 ::ll::TypedStorage<8, 56, ::GameVersion> mDefaultVersion;
59 ::ll::TypedStorage<4, 4, ::OptionResetFlags const> mOptionResetFlags;
60 ::ll::TypedStorage<8, 8, ::Option*> mOverrideSource;
61 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOverrideSourceValueChangedSubscription;
62 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOverrideSourceInputModeChangedSubscription;
63 ::ll::TypedStorage<8, 64, ::std::function<void(
bool)>> mRequestSaveCallback;
75 ::OptionOwnerType ownerType,
76 ::OptionResetFlags resetFlags,
77 ::std::string
const& captionId,
78 ::std::string
const& saveTag,
79 ::OptionType optionType,
91 ::OptionOwnerType ownerType,
92 ::OptionResetFlags resetFlags,
93 ::std::string
const& captionId,
94 ::std::string
const& saveTag,
95 ::OptionType optionType,
107 using BoolFilter = ::std::function<bool(
bool)>;
109 using SaveIntCallback = ::std::function<int(
int)>;
111 using StringFilter = ::std::function<::std::string(::std::string
const&)>;
116 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Option::Impl>> mImpl;
127 virtual ~Option() =
default;
132 virtual void save(::std::vector<::std::pair<::std::string, ::std::string>>&) = 0;
134 virtual void load(::std::string
const&) = 0;
136 virtual void load(::std::map<::std::string, ::std::string>& propertyMap);
146 ::OptionOwnerType ownerType,
147 ::OptionResetFlags resetFlags,
148 ::std::string
const& captionId,
149 ::std::string
const& saveTag,
150 ::OptionType optionType,
154 MCAPI_C
void _resetOption(::InputMode inputMode,
bool saveOptionChange);
156 MCAPI
void _updatePropertyVector(
157 ::std::vector<::std::pair<::std::string, ::std::string>>& propertyVector,
158 ::std::string
const& value
161 MCAPI_C
bool canModify()
const;
163 MCAPI
bool getBool()
const;
165 MCAPI_C
bool getBool(::InputMode inputMode)
const;
167 MCAPI_C
float getFloat()
const;
169 MCAPI_C
float getFloat(::InputMode inputMode)
const;
171 MCAPI_C
float getFloatMax()
const;
173 MCAPI_C
float getFloatMin()
const;
175 MCAPI_C
int getInt()
const;
177 MCAPI_C int64 getInt64()
const;
179 MCAPI_C ::std::string
const& getString()
const;
181 MCAPI_C ::std::vector<::std::string> getStringList()
const;
183 MCAPI_C uint64 getUInt64()
const;
185 MCAPI_C ::std::unordered_map<int, ::std::string>
const& getValueNameMap()
const;
187 MCAPI_C ::std::vector<int>
const& getValues()
const;
189 MCAPI_C ::glm::vec3 getVec3()
const;
191 MCAPI_C
bool isDefaultValue(::InputMode inputMode)
const;
193 MCAPI_C
bool isNewVersion(
::GameVersion currentVersion)
const;
195 MCAPI ::Bedrock::PubSub::Subscription registerLock(::std::function<
void(
bool&)> isModifiableCondition);
197 MCAPI_C ::Bedrock::PubSub::Subscription
198 registerObserver(::std::function<
void(::Option
const&, ::InputMode)> onInputModeChangedCallback);
200 MCAPI ::Bedrock::PubSub::Subscription
201 registerObserver(::std::function<
void(::Option
const&)> onValueChangedCallback);
204 registerTelemetryProperty(::std::string
const& propertyName, ::Social::Events::PrivacyTagEnterprise propertyTag);
206 MCAPI_C
void set(
int value);
208 MCAPI_C
void setOverrideSource(::Option* overrideSource);
210 MCAPI_C
void toggle();
216 MCAPI_C
static bool read(::std::string
const& valueString,
int& output);
218 MCAPI_C
static bool read(::std::string
const& valueString,
float& output);
220 MCAPI_C
static bool read(::std::string
const& valueString, ::std::vector<::std::string>& output);
222 MCAPI
static bool read(::std::string
const& valueString,
bool& output);
230 ::OptionOwnerType ownerType,
231 ::OptionResetFlags resetFlags,
232 ::std::string
const& captionId,
233 ::std::string
const& saveTag,
234 ::OptionType optionType,
248 MCAPI
void $load(::std::map<::std::string, ::std::string>& propertyMap);