mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-16 05:42:55 +00:00
ControllerEmu/BooleanSetting: Add exclusive flag
This commit is contained in:
parent
9cfcbfacbe
commit
c7c93a8e80
@ -7,15 +7,16 @@
|
|||||||
namespace ControllerEmu
|
namespace ControllerEmu
|
||||||
{
|
{
|
||||||
BooleanSetting::BooleanSetting(const std::string& setting_name, const std::string& ui_name,
|
BooleanSetting::BooleanSetting(const std::string& setting_name, const std::string& ui_name,
|
||||||
const bool default_value, const SettingType setting_type)
|
const bool default_value, const SettingType setting_type,
|
||||||
|
const bool exclusive)
|
||||||
: m_type(setting_type), m_name(setting_name), m_ui_name(ui_name),
|
: m_type(setting_type), m_name(setting_name), m_ui_name(ui_name),
|
||||||
m_default_value(default_value), m_value(default_value)
|
m_default_value(default_value), m_value(default_value), m_exclusive(exclusive)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
BooleanSetting::BooleanSetting(const std::string& setting_name, const bool default_value,
|
BooleanSetting::BooleanSetting(const std::string& setting_name, const bool default_value,
|
||||||
const SettingType setting_type)
|
const SettingType setting_type, const bool exclusive)
|
||||||
: BooleanSetting(setting_name, setting_name, default_value, setting_type)
|
: BooleanSetting(setting_name, setting_name, default_value, setting_type, exclusive)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,6 +24,12 @@ bool BooleanSetting::GetValue() const
|
|||||||
{
|
{
|
||||||
return m_value;
|
return m_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BooleanSetting::IsExclusive() const
|
||||||
|
{
|
||||||
|
return m_exclusive;
|
||||||
|
}
|
||||||
|
|
||||||
void BooleanSetting::SetValue(bool value)
|
void BooleanSetting::SetValue(bool value)
|
||||||
{
|
{
|
||||||
m_value = value;
|
m_value = value;
|
||||||
|
@ -15,17 +15,24 @@ class BooleanSetting
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BooleanSetting(const std::string& setting_name, const std::string& ui_name,
|
BooleanSetting(const std::string& setting_name, const std::string& ui_name,
|
||||||
const bool default_value, const SettingType setting_type = SettingType::NORMAL);
|
const bool default_value, const SettingType setting_type = SettingType::NORMAL,
|
||||||
|
const bool exclusive = false);
|
||||||
BooleanSetting(const std::string& setting_name, const bool default_value,
|
BooleanSetting(const std::string& setting_name, const bool default_value,
|
||||||
const SettingType setting_type = SettingType::NORMAL);
|
const SettingType setting_type = SettingType::NORMAL,
|
||||||
|
const bool exclusive = false);
|
||||||
|
|
||||||
bool GetValue() const;
|
bool GetValue() const;
|
||||||
void SetValue(bool value);
|
void SetValue(bool value);
|
||||||
|
bool IsExclusive() const;
|
||||||
|
|
||||||
const SettingType m_type;
|
const SettingType m_type;
|
||||||
const std::string m_name;
|
const std::string m_name;
|
||||||
const std::string m_ui_name;
|
const std::string m_ui_name;
|
||||||
const bool m_default_value;
|
const bool m_default_value;
|
||||||
bool m_value;
|
bool m_value;
|
||||||
|
|
||||||
|
private:
|
||||||
|
const bool m_exclusive;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ControllerEmu
|
} // namespace ControllerEmu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user