summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h
blob: 2e84d383ba5e75c733b6880d2e4751e728f75231 (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
// Copyright 2017 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#pragma once

#include <string>

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

namespace ControllerEmu
{
class NumericSetting
{
public:
  NumericSetting(const std::string& setting_name, const ControlState default_value,
                 const u32 low = 0, const u32 high = 100,
                 const SettingType setting_type = SettingType::NORMAL);

  ControlState GetValue() const;
  void SetValue(ControlState value);
  const SettingType m_type;
  const std::string m_name;
  const ControlState m_default_value;
  const u32 m_low;
  const u32 m_high;
  ControlState m_value;
};

}  // namespace ControllerEmu