diff options
author | bunnei <bunneidev@gmail.com> | 2020-07-24 19:19:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 19:19:27 -0700 |
commit | 2ed8f3f549f5832edcc4de7af96d3755e683a060 (patch) | |
tree | 3918ceb9e822e2765528cadc5ef1493c437088b7 /src/yuzu/configuration/configuration_shared.h | |
parent | d488cb843e65e10babc51edb6b741b2b3f38aeae (diff) | |
parent | 2120740ee62afbf3bc657d9ac7b9d07da0816a87 (diff) |
Merge pull request #4334 from lat9nq/clear-per-game-settings
configure_per_game: Clearer per-game settings
Diffstat (limited to 'src/yuzu/configuration/configuration_shared.h')
-rw-r--r-- | src/yuzu/configuration/configuration_shared.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/yuzu/configuration/configuration_shared.h b/src/yuzu/configuration/configuration_shared.h index b11b1b950..003148c68 100644 --- a/src/yuzu/configuration/configuration_shared.h +++ b/src/yuzu/configuration/configuration_shared.h @@ -15,9 +15,17 @@ constexpr int USE_GLOBAL_INDEX = 0; constexpr int USE_GLOBAL_SEPARATOR_INDEX = 1; constexpr int USE_GLOBAL_OFFSET = 2; +enum class CheckState { + Off, + On, + Global, + Count, +}; + // Global-aware apply and set functions -void ApplyPerGameSetting(Settings::Setting<bool>* setting, const QCheckBox* checkbox); +void ApplyPerGameSetting(Settings::Setting<bool>* setting, const QCheckBox* checkbox, + const CheckState& tracker); void ApplyPerGameSetting(Settings::Setting<int>* setting, const QComboBox* combobox); void ApplyPerGameSetting(Settings::Setting<Settings::RendererBackend>* setting, const QComboBox* combobox); @@ -31,6 +39,14 @@ void SetPerGameSetting(QComboBox* combobox, void SetPerGameSetting(QComboBox* combobox, const Settings::Setting<Settings::GPUAccuracy>* setting); -void InsertGlobalItem(QComboBox* combobox); +void SetHighlight(QWidget* widget, const std::string& name, bool highlighted); +void SetColoredTristate(QCheckBox* checkbox, const std::string& name, + const Settings::Setting<bool>& setting, CheckState& tracker); +void SetColoredTristate(QCheckBox* checkbox, const std::string& name, bool global, bool state, + bool global_state, CheckState& tracker); +void SetColoredComboBox(QComboBox* combobox, QWidget* target, const std::string& target_name, + int global); + +void InsertGlobalItem(QComboBox* combobox, int global_index); } // namespace ConfigurationShared |