diff options
| author | CostPerUnit <wilsonred304@gmail.com> | 2025-05-22 19:57:27 -0600 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2025-05-29 19:39:10 -0500 |
| commit | a5b4a0b9e486cb11ebcd1e30a509516c5e13bb35 (patch) | |
| tree | 236d06687474c5ae8f7da05d2faf65a44bc68a22 /Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h | |
| parent | 53b54406bd546b507822a3bd30311aa0cd96ee71 (diff) | |
InputCommon/DolphinQt: Add advanced settings button for "Point" and "Point (Passthrough)" "Enabled" checkboxes.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h index 7928fb61a9..c67b0ac132 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h @@ -15,6 +15,7 @@ #include "Common/IniFile.h" #include "InputCommon/ControllerEmu/Control/Control.h" +#include "InputCommon/ControllerEmu/Setting/NumericSetting.h" #include "InputCommon/ControllerInterface/CoreDevice.h" namespace ControllerEmu @@ -62,7 +63,7 @@ public: Disabled, }; - explicit ControlGroup(std::string name, GroupType type = GroupType::Other, + explicit ControlGroup(const std::string& name, GroupType type = GroupType::Other, DefaultValue default_value = DefaultValue::AlwaysEnabled); ControlGroup(std::string name, std::string ui_name, GroupType type = GroupType::Other, DefaultValue default_value = DefaultValue::AlwaysEnabled); @@ -98,12 +99,17 @@ public: return std::copysign(std::max(T{0}, std::abs(input) - deadzone) / (T{1} - deadzone), input); } + bool HasEnabledSetting() const; + const std::string name; const std::string ui_name; const GroupType type; + + // The default "enabled" state. const DefaultValue default_value; + SettingValue<bool> enabled; + std::unique_ptr<NumericSetting<bool>> enabled_setting; - bool enabled = true; std::vector<std::unique_ptr<Control>> controls; std::vector<std::unique_ptr<NumericSettingBase>> numeric_settings; }; |
