StringSetting, gui.set_locale removed

This commit is contained in:
MihailRis
2024-04-26 03:03:42 +03:00
parent 6650e27737
commit 001617f6d9
7 changed files with 47 additions and 20 deletions
+4
View File
@@ -32,3 +32,7 @@ std::string FlagSetting::toString() const {
return "invalid format";
}
}
std::string StringSetting::toString() const {
return value;
}
+12 -3
View File
@@ -56,7 +56,7 @@ public:
});
}
T get() const {
const T& get() const {
return value;
}
@@ -160,8 +160,7 @@ public:
FlagSetting(
bool value,
setting_format format=setting_format::simple
) : ObservableSetting(value, format)
{}
) : ObservableSetting(value, format) {}
void toggle() {
set(!get());
@@ -170,4 +169,14 @@ public:
virtual std::string toString() const override;
};
class StringSetting : public ObservableSetting<std::string> {
public:
StringSetting(
std::string value,
setting_format format=setting_format::simple
) : ObservableSetting(value, format) {}
virtual std::string toString() const override;
};
#endif // DATA_SETTING_H_