Permalink
Browse files

ControllerEmu/BooleanSetting: Add exclusive flag

  • Loading branch information...
spycrab committed Jul 2, 2018
1 parent 9cfcbfa commit c7c93a8e8027085d2b8fd6b7c6acc73595e6a2c0
@@ -7,22 +7,29 @@
namespace ControllerEmu
{
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_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,
const SettingType setting_type)
: BooleanSetting(setting_name, setting_name, default_value, setting_type)
const SettingType setting_type, const bool exclusive)
: BooleanSetting(setting_name, setting_name, default_value, setting_type, exclusive)
{
}
bool BooleanSetting::GetValue() const
{
return m_value;
}
bool BooleanSetting::IsExclusive() const
{
return m_exclusive;
}
void BooleanSetting::SetValue(bool value)
{
m_value = value;
@@ -15,17 +15,24 @@ class BooleanSetting
{
public:
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,
const SettingType setting_type = SettingType::NORMAL);
const SettingType setting_type = SettingType::NORMAL,
const bool exclusive = false);
bool GetValue() const;
void SetValue(bool value);
bool IsExclusive() const;
const SettingType m_type;
const std::string m_name;
const std::string m_ui_name;
const bool m_default_value;
bool m_value;
private:
const bool m_exclusive;
};
} // namespace ControllerEmu

0 comments on commit c7c93a8

Please sign in to comment.