mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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".
This commit is contained in:
@ -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<std::unique_ptr<Control>> controls;
|
||||
std::vector<std::unique_ptr<NumericSettingBase>> numeric_settings;
|
||||
};
|
||||
|
Reference in New Issue
Block a user