From d67a2304b0f542e21f680265da80efef3e0a83d9 Mon Sep 17 00:00:00 2001 From: rlnilsen <47765059+rlnilsen@users.noreply.github.com> Date: Wed, 30 Oct 2019 02:05:42 +0100 Subject: Input: Add optional "enable" setting to the ControlGroup class. The setting is exposed as a check box in the QGroupBox instance that visualises the ControlGroup instance. The setting is saved under "[control group name]/Enabled", but only when it is "false". The default value is "true". --- .../InputCommon/ControllerEmu/ControlGroup/ControlGroup.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h') diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h index 310df90e30..26b3ce5ad6 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/ControlGroup.h @@ -48,8 +48,16 @@ enum class GroupType class ControlGroup { public: - explicit ControlGroup(std::string name, GroupType type = GroupType::Other); - ControlGroup(std::string name, std::string ui_name, GroupType type = GroupType::Other); + enum class CanBeDisabled + { + No, + Yes, + }; + + explicit ControlGroup(std::string name, GroupType type = GroupType::Other, + CanBeDisabled can_be_disabled = CanBeDisabled::No); + ControlGroup(std::string name, std::string ui_name, GroupType type = GroupType::Other, + CanBeDisabled can_be_disabled = CanBeDisabled::No); virtual ~ControlGroup(); virtual void LoadConfig(IniFile::Section* sec, const std::string& defdev = "", @@ -79,7 +87,9 @@ public: const std::string name; const std::string ui_name; const GroupType type; + const bool can_be_disabled; + bool enabled = true; std::vector> controls; std::vector> numeric_settings; }; -- cgit v1.2.3