diff options
| author | 2023-05-09 01:35:25 -0400 | |
|---|---|---|
| committer | 2023-07-21 10:56:07 -0400 | |
| commit | 464aad52cd644bdc32ca4eb35b0ce669c3b30c4f (patch) | |
| tree | 17ceb24d150d42fa154343c578062cad6581bd7e /src/common | |
| parent | config: Don't merge the maps (diff) | |
| download | yuzu-464aad52cd644bdc32ca4eb35b0ce669c3b30c4f.tar.gz yuzu-464aad52cd644bdc32ca4eb35b0ce669c3b30c4f.tar.xz yuzu-464aad52cd644bdc32ca4eb35b0ce669c3b30c4f.zip | |
settings: Add UiGeneral class
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/settings.cpp | 4 | ||||
| -rw-r--r-- | src/common/settings.h | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 38a82f6f7..b7a0c063f 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp | |||
| @@ -144,6 +144,9 @@ float Volume() { | |||
| 144 | return values.volume.GetValue() / static_cast<f32>(values.volume.GetDefault()); | 144 | return values.volume.GetValue() / static_cast<f32>(values.volume.GetDefault()); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | Linkage::Linkage() = default; | ||
| 148 | Linkage::~Linkage() = default; | ||
| 149 | |||
| 147 | const char* TranslateCategory(Category category) { | 150 | const char* TranslateCategory(Category category) { |
| 148 | switch (category) { | 151 | switch (category) { |
| 149 | case Category::Audio: | 152 | case Category::Audio: |
| @@ -176,6 +179,7 @@ const char* TranslateCategory(Category category) { | |||
| 176 | case Category::Controls: | 179 | case Category::Controls: |
| 177 | return "Controls"; | 180 | return "Controls"; |
| 178 | case Category::Ui: | 181 | case Category::Ui: |
| 182 | case Category::UiGeneral: | ||
| 179 | return "UI"; | 183 | return "UI"; |
| 180 | case Category::UiLayout: | 184 | case Category::UiLayout: |
| 181 | return "UiLayout"; | 185 | return "UiLayout"; |
diff --git a/src/common/settings.h b/src/common/settings.h index 4ca8299b3..e60105059 100644 --- a/src/common/settings.h +++ b/src/common/settings.h | |||
| @@ -143,6 +143,7 @@ enum class Category : u32 { | |||
| 143 | AddOns, | 143 | AddOns, |
| 144 | Controls, | 144 | Controls, |
| 145 | Ui, | 145 | Ui, |
| 146 | UiGeneral, | ||
| 146 | UiLayout, | 147 | UiLayout, |
| 147 | UiGameList, | 148 | UiGameList, |
| 148 | Screenshots, | 149 | Screenshots, |
| @@ -209,8 +210,10 @@ public: | |||
| 209 | 210 | ||
| 210 | class Linkage { | 211 | class Linkage { |
| 211 | public: | 212 | public: |
| 212 | std::map<Category, std::forward_list<BasicSetting*>> by_category; | 213 | explicit Linkage(); |
| 213 | std::vector<std::function<void()>> restore_functions; | 214 | ~Linkage(); |
| 215 | std::map<Category, std::forward_list<BasicSetting*>> by_category{}; | ||
| 216 | std::vector<std::function<void()>> restore_functions{}; | ||
| 214 | u32 count; | 217 | u32 count; |
| 215 | }; | 218 | }; |
| 216 | 219 | ||