mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
StringSetting, gui.set_locale removed
This commit is contained in:
parent
6650e27737
commit
001617f6d9
7 changed files with 47 additions and 20 deletions
|
|
@ -32,3 +32,7 @@ std::string FlagSetting::toString() const {
|
|||
return "invalid format";
|
||||
}
|
||||
}
|
||||
|
||||
std::string StringSetting::toString() const {
|
||||
return value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue