summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/Setting/BooleanSetting.h
blob: a2729a588eb62d179e63fe23716a296c4af35cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2017 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#pragma once

#include <string>

#include "InputCommon/ControllerEmu/Setting/Setting.h"
#include "InputCommon/ControllerInterface/Device.h"

namespace ControllerEmu
{
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 exclusive = false);
  BooleanSetting(const std::string& setting_name, const bool default_value,
                 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