Added a setter to Settings.

This commit is contained in:
Relintai 2022-01-06 18:51:50 +01:00
parent 2db1a0693e
commit 86f19a3353
2 changed files with 6 additions and 0 deletions

View File

@ -58,6 +58,10 @@ bool Settings::get_value_bool(const String &key, const bool def) {
}
}
void Settings::set_value(const String &key, const Variant &value) {
_data[key] = value;
}
void Settings::parse_ini_file(const String &path) {
FILE *f = fopen(path.c_str(), "r");

View File

@ -15,6 +15,8 @@ public:
double get_value_double(const String &key, const double def = 0);
bool get_value_bool(const String &key, const bool def = false);
void set_value(const String &key, const Variant &value);
void parse_ini_file(const String &path);
static Settings *get_singleton();