Class ModSettingsManager

#include <Geode/loader/ModSettingsManager.hpp>
classModSettingsManager{ ... }
No description provided
Examples0
Public static methods1
staticgeode::ModSettingsManager*from()
No description provided
Public member functions9
geode::Result<>load()

Load setting values from savedata. The format of the savedata should be an object with the keys being setting IDs and then the values the values of the saved settings

Return value
Ok if no horrible errors happened. Note that a setting value missing is not considered a horrible error, but will instead just log a warning into the console!
voidsave()

Save setting values to savedata. The format of the savedata will be an object with the keys being setting IDs and then the values the values of the saved settings

ℹ If saving a setting fails, it will log a warning to the console

⚠️ This will overwrite the whole `json` parameter - be sure to pass the full settings savedata to `load()` so you can be sure that unregistered custom settings' saved values don't disappear!

matjson::Value&getSaveData()

Get the savedata for settings, aka the JSON object that contains all the settings’ saved states that was loaded up from disk and will be saved to disk

⚠️ Modifying this will modify the value of the settings - use carefully!

geode::Result<>registerCustomSettingType(,)
No description provided
geode::Result<>registerLegacyCustomSetting(,)
No description provided
std::shared_ptr<geode::SettingV3>get()
No description provided
std::shared_ptr<geode::SettingValue>getLegacy()
No description provided
std::optional<geode::Setting>getLegacyDefinition()
No description provided
boolrestartRequired()const

Returns true if any setting with the "restart-required" attribute has been altered

Fields0
Protected member functions0
Protected fields0