mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Add emulated Shinkansen controller
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include "Core/HW/WiimoteEmu/Extension/Drums.h"
|
||||
#include "Core/HW/WiimoteEmu/Extension/Guitar.h"
|
||||
#include "Core/HW/WiimoteEmu/Extension/Nunchuk.h"
|
||||
#include "Core/HW/WiimoteEmu/Extension/Shinkansen.h"
|
||||
#include "Core/HW/WiimoteEmu/Extension/TaTaCon.h"
|
||||
#include "Core/HW/WiimoteEmu/Extension/Turntable.h"
|
||||
#include "Core/HW/WiimoteEmu/Extension/UDrawTablet.h"
|
||||
@ -32,6 +33,7 @@ WiimoteEmuExtension::WiimoteEmuExtension(MappingWindow* window) : MappingWidget(
|
||||
CreateUDrawTabletLayout();
|
||||
CreateDrawsomeTabletLayout();
|
||||
CreateTaTaConLayout();
|
||||
CreateShinkansenLayout();
|
||||
CreateMainLayout();
|
||||
|
||||
ChangeExtensionType(WiimoteEmu::ExtensionNumber::NONE);
|
||||
@ -224,6 +226,21 @@ void WiimoteEmuExtension::CreateTaTaConLayout()
|
||||
m_tatacon_box->setLayout(hbox);
|
||||
}
|
||||
|
||||
void WiimoteEmuExtension::CreateShinkansenLayout()
|
||||
{
|
||||
auto* hbox = new QHBoxLayout();
|
||||
m_shinkansen_box = new QGroupBox(tr("Shinkansen"), this);
|
||||
|
||||
hbox->addWidget(CreateGroupBox(
|
||||
tr("Levers"), Wiimote::GetShinkansenGroup(GetPort(), WiimoteEmu::ShinkansenGroup::Levers)));
|
||||
hbox->addWidget(CreateGroupBox(
|
||||
tr("Buttons"), Wiimote::GetShinkansenGroup(GetPort(), WiimoteEmu::ShinkansenGroup::Buttons)));
|
||||
hbox->addWidget(CreateGroupBox(
|
||||
tr("Light"), Wiimote::GetShinkansenGroup(GetPort(), WiimoteEmu::ShinkansenGroup::Light)));
|
||||
|
||||
m_shinkansen_box->setLayout(hbox);
|
||||
}
|
||||
|
||||
void WiimoteEmuExtension::CreateMainLayout()
|
||||
{
|
||||
m_main_layout = new QHBoxLayout();
|
||||
@ -237,6 +254,7 @@ void WiimoteEmuExtension::CreateMainLayout()
|
||||
m_main_layout->addWidget(m_udraw_tablet_box);
|
||||
m_main_layout->addWidget(m_drawsome_tablet_box);
|
||||
m_main_layout->addWidget(m_tatacon_box);
|
||||
m_main_layout->addWidget(m_shinkansen_box);
|
||||
|
||||
setLayout(m_main_layout);
|
||||
}
|
||||
@ -269,4 +287,5 @@ void WiimoteEmuExtension::ChangeExtensionType(u32 type)
|
||||
m_udraw_tablet_box->setHidden(type != ExtensionNumber::UDRAW_TABLET);
|
||||
m_drawsome_tablet_box->setHidden(type != ExtensionNumber::DRAWSOME_TABLET);
|
||||
m_tatacon_box->setHidden(type != ExtensionNumber::TATACON);
|
||||
m_shinkansen_box->setHidden(type != ExtensionNumber::SHINKANSEN);
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ private:
|
||||
void CreateUDrawTabletLayout();
|
||||
void CreateDrawsomeTabletLayout();
|
||||
void CreateTaTaConLayout();
|
||||
void CreateShinkansenLayout();
|
||||
void CreateMainLayout();
|
||||
|
||||
// Main
|
||||
@ -46,4 +47,5 @@ private:
|
||||
QGroupBox* m_udraw_tablet_box;
|
||||
QGroupBox* m_drawsome_tablet_box;
|
||||
QGroupBox* m_tatacon_box;
|
||||
QGroupBox* m_shinkansen_box;
|
||||
};
|
||||
|
Reference in New Issue
Block a user