Implement hotkey options group in HotkeyInputConfigDiag

This commit is contained in:
Michael Maltese
2017-02-07 18:26:06 -08:00
parent a6bc56b626
commit 8adad0729e
4 changed files with 47 additions and 31 deletions

View File

@ -14,7 +14,6 @@
#include "InputCommon/ControllerEmu/Control/Input.h"
#include "InputCommon/ControllerEmu/ControlGroup/Buttons.h"
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
#include "InputCommon/ControllerEmu/Setting/BackgroundInputSetting.h"
#include "InputCommon/ControllerEmu/Setting/BooleanSetting.h"
#include "InputCommon/GCPadStatus.h"
@ -228,11 +227,6 @@ ControllerEmu::ControlGroup* GetHotkeyGroup(HotkeyGroup group)
return static_cast<HotkeyManager*>(s_config.GetController(0))->GetHotkeyGroup(group);
}
ControllerEmu::ControlGroup* GetOptionsGroup()
{
return static_cast<HotkeyManager*>(s_config.GetController(0))->GetOptionsGroup();
}
void Shutdown()
{
s_config.ClearControllers();
@ -272,12 +266,6 @@ HotkeyManager::HotkeyManager()
m_keys[group]->controls.emplace_back(new ControllerEmu::Input(hotkey_labels[key]));
}
}
groups.emplace_back(m_options = new ControllerEmu::ControlGroup(_trans("Options")));
m_options->boolean_settings.emplace_back(
std::make_unique<ControllerEmu::BackgroundInputSetting>(_trans("Background Input")));
m_options->boolean_settings.emplace_back(std::make_unique<ControllerEmu::BooleanSetting>(
_trans("Iterative Input"), false, ControllerEmu::SettingType::VIRTUAL));
}
HotkeyManager::~HotkeyManager()
@ -309,11 +297,6 @@ ControllerEmu::ControlGroup* HotkeyManager::GetHotkeyGroup(HotkeyGroup group) co
return m_hotkey_groups[group];
}
ControllerEmu::ControlGroup* HotkeyManager::GetOptionsGroup() const
{
return m_options;
}
int HotkeyManager::FindGroupByID(int id) const
{
const auto i = std::find_if(groups_info.begin(), groups_info.end(),