2017-05-20 15:53:17 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2018-05-28 01:48:04 +00:00
|
|
|
#include "DolphinQt2/Config/Mapping/WiimoteEmuMotionControl.h"
|
|
|
|
|
2017-05-20 15:53:17 +00:00
|
|
|
#include <QFormLayout>
|
|
|
|
#include <QGroupBox>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
#include "Core/HW/Wiimote.h"
|
|
|
|
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
|
2018-05-28 01:48:04 +00:00
|
|
|
|
2017-05-20 15:53:17 +00:00
|
|
|
#include "InputCommon/InputConfig.h"
|
|
|
|
|
|
|
|
WiimoteEmuMotionControl::WiimoteEmuMotionControl(MappingWindow* window) : MappingWidget(window)
|
|
|
|
{
|
|
|
|
CreateMainLayout();
|
|
|
|
}
|
|
|
|
|
|
|
|
void WiimoteEmuMotionControl::CreateMainLayout()
|
|
|
|
{
|
|
|
|
m_main_layout = new QHBoxLayout();
|
|
|
|
|
|
|
|
m_main_layout->addWidget(CreateGroupBox(
|
|
|
|
tr("Shake"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Shake)));
|
2017-05-20 19:08:31 +00:00
|
|
|
m_main_layout->addWidget(
|
|
|
|
CreateGroupBox(tr("IR"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::IR)));
|
2017-05-20 15:53:17 +00:00
|
|
|
m_main_layout->addWidget(CreateGroupBox(
|
2017-05-20 19:08:31 +00:00
|
|
|
tr("Tilt"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Tilt)));
|
2017-05-20 15:53:17 +00:00
|
|
|
m_main_layout->addWidget(CreateGroupBox(
|
2017-05-20 19:08:31 +00:00
|
|
|
tr("Swing"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Swing)));
|
2017-05-20 15:53:17 +00:00
|
|
|
|
|
|
|
setLayout(m_main_layout);
|
|
|
|
}
|
|
|
|
|
|
|
|
void WiimoteEmuMotionControl::LoadSettings()
|
|
|
|
{
|
|
|
|
Wiimote::LoadConfig();
|
|
|
|
}
|
|
|
|
|
|
|
|
void WiimoteEmuMotionControl::SaveSettings()
|
|
|
|
{
|
|
|
|
Wiimote::GetConfig()->SaveConfig();
|
|
|
|
}
|
|
|
|
|
|
|
|
InputConfig* WiimoteEmuMotionControl::GetConfig()
|
|
|
|
{
|
|
|
|
return Wiimote::GetConfig();
|
|
|
|
}
|