diff options
| author | 2023-06-21 03:23:36 -0400 | |
|---|---|---|
| committer | 2023-07-21 10:56:55 -0400 | |
| commit | b2438f1fb7d083ffe8c8afdc30e9c612631d6ace (patch) | |
| tree | 7c7f44552f286e3289a09c621b960e082ec8fb60 /src/common/settings_common.cpp | |
| parent | configuration: Use a builder to create widgets (diff) | |
| download | yuzu-b2438f1fb7d083ffe8c8afdc30e9c612631d6ace.tar.gz yuzu-b2438f1fb7d083ffe8c8afdc30e9c612631d6ace.tar.xz yuzu-b2438f1fb7d083ffe8c8afdc30e9c612631d6ace.zip | |
settings: Define specializations for settings
Suggests to a frontend how to represent each setting.
Diffstat (limited to '')
| -rw-r--r-- | src/common/settings_common.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/common/settings_common.cpp b/src/common/settings_common.cpp index fb42991fa..3e86c7347 100644 --- a/src/common/settings_common.cpp +++ b/src/common/settings_common.cpp | |||
| @@ -7,9 +7,10 @@ | |||
| 7 | namespace Settings { | 7 | namespace Settings { |
| 8 | 8 | ||
| 9 | BasicSetting::BasicSetting(Linkage& linkage, const std::string& name, enum Category category_, | 9 | BasicSetting::BasicSetting(Linkage& linkage, const std::string& name, enum Category category_, |
| 10 | bool save_, bool runtime_modifiable_) | 10 | bool save_, bool runtime_modifiable_, |
| 11 | : label{name}, category{category_}, id{linkage.count}, save{save_}, runtime_modifiable{ | 11 | enum Specialization specialization_) |
| 12 | runtime_modifiable_} { | 12 | : label{name}, category{category_}, id{linkage.count}, save{save_}, |
| 13 | runtime_modifiable{runtime_modifiable_}, specialization{specialization_} { | ||
| 13 | linkage.by_category[category].push_front(this); | 14 | linkage.by_category[category].push_front(this); |
| 14 | linkage.count++; | 15 | linkage.count++; |
| 15 | } | 16 | } |
| @@ -38,6 +39,10 @@ Category BasicSetting::Category() const { | |||
| 38 | return category; | 39 | return category; |
| 39 | } | 40 | } |
| 40 | 41 | ||
| 42 | Specialization BasicSetting::Specialization() const { | ||
| 43 | return specialization; | ||
| 44 | } | ||
| 45 | |||
| 41 | const std::string& BasicSetting::GetLabel() const { | 46 | const std::string& BasicSetting::GetLabel() const { |
| 42 | return label; | 47 | return label; |
| 43 | } | 48 | } |