2017-02-08 22:15:43 -05:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
2019-03-26 19:31:03 -05:00
|
|
|
|
2017-02-08 22:15:43 -05:00
|
|
|
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
|
2019-03-26 19:31:03 -05:00
|
|
|
#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
|
2020-09-15 04:34:41 -07:00
|
|
|
#include "InputCommon/ControllerInterface/CoreDevice.h"
|
2017-02-08 22:15:43 -05:00
|
|
|
|
|
|
|
namespace ControllerEmu
|
|
|
|
{
|
|
|
|
class Slider : public ControlGroup
|
|
|
|
{
|
|
|
|
public:
|
2018-07-13 11:49:05 -04:00
|
|
|
struct StateData
|
|
|
|
{
|
|
|
|
ControlState value{};
|
|
|
|
};
|
|
|
|
|
2017-12-19 11:21:27 +01:00
|
|
|
Slider(const std::string& name_, const std::string& ui_name_);
|
|
|
|
explicit Slider(const std::string& name_);
|
2017-02-08 22:15:43 -05:00
|
|
|
|
2021-05-04 23:47:55 +03:00
|
|
|
StateData GetState() const;
|
2019-03-26 19:31:03 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
SettingValue<double> m_deadzone_setting;
|
2017-02-08 22:15:43 -05:00
|
|
|
};
|
|
|
|
} // namespace ControllerEmu
|