2017-02-09 03:15:43 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-02-09 03:15:43 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "InputCommon/ControllerEmu/ControlGroup/Buttons.h"
|
|
|
|
|
|
|
|
namespace ControllerEmu
|
|
|
|
{
|
|
|
|
class ModifySettingsButton : public Buttons
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit ModifySettingsButton(std::string button_name);
|
|
|
|
|
|
|
|
void AddInput(std::string button_name, bool toggle = false);
|
|
|
|
|
2021-05-04 20:48:55 +00:00
|
|
|
void UpdateState();
|
2017-02-09 03:15:43 +00:00
|
|
|
|
2021-05-04 20:48:55 +00:00
|
|
|
const std::vector<bool>& IsSettingToggled() const;
|
|
|
|
const std::vector<bool>& GetSettingsModifier() const;
|
2017-02-09 03:15:43 +00:00
|
|
|
|
|
|
|
private:
|
2021-05-04 20:48:55 +00:00
|
|
|
std::vector<bool> m_threshold_exceeded; // internal calculation (if "state" was above threshold)
|
|
|
|
std::vector<bool> m_associated_settings_toggle; // is setting toggled or hold?
|
|
|
|
std::vector<bool> m_associated_settings; // result
|
2017-02-09 03:15:43 +00:00
|
|
|
};
|
|
|
|
} // namespace ControllerEmu
|