From 8d3bb1ad804736aad14890ccd28d1b0f6dce4afa Mon Sep 17 00:00:00 2001 From: Joe Stringer Date: Wed, 7 Aug 2024 00:48:12 -0700 Subject: [PATCH] Settings: Add DenshaCon bindings UI --- pcsx2-qt/CMakeLists.txt | 3 + pcsx2-qt/Settings/ControllerBindingWidget.cpp | 21 + .../Settings/USBBindingWidget_DenshaCon.ui | 755 +++++++++++++++++ .../Settings/USBBindingWidget_RyojouhenCon.ui | 762 ++++++++++++++++++ .../USBBindingWidget_ShinkansenCon.ui | 737 +++++++++++++++++ pcsx2-qt/pcsx2-qt.vcxproj | 9 + pcsx2-qt/pcsx2-qt.vcxproj.filters | 9 + pcsx2-qt/resources/images/Denshacon.svg | 443 ++++++++++ pcsx2-qt/resources/images/RyojouhenCon.svg | 543 +++++++++++++ pcsx2-qt/resources/images/ShinkansenCon.svg | 396 +++++++++ pcsx2-qt/resources/resources.qrc | 3 + 11 files changed, 3681 insertions(+) create mode 100644 pcsx2-qt/Settings/USBBindingWidget_DenshaCon.ui create mode 100644 pcsx2-qt/Settings/USBBindingWidget_RyojouhenCon.ui create mode 100644 pcsx2-qt/Settings/USBBindingWidget_ShinkansenCon.ui create mode 100644 pcsx2-qt/resources/images/Denshacon.svg create mode 100644 pcsx2-qt/resources/images/RyojouhenCon.svg create mode 100644 pcsx2-qt/resources/images/ShinkansenCon.svg diff --git a/pcsx2-qt/CMakeLists.txt b/pcsx2-qt/CMakeLists.txt index 36dce5b072..0df63b628e 100644 --- a/pcsx2-qt/CMakeLists.txt +++ b/pcsx2-qt/CMakeLists.txt @@ -146,9 +146,12 @@ target_sources(pcsx2-qt PRIVATE Settings/SettingsWindow.cpp Settings/SettingsWindow.h Settings/SettingsWindow.ui + Settings/USBBindingWidget_DenshaCon.ui Settings/USBBindingWidget_DrivingForce.ui Settings/USBBindingWidget_GTForce.ui Settings/USBBindingWidget_GunCon2.ui + Settings/USBBindingWidget_RyojouhenCon.ui + Settings/USBBindingWidget_ShinkansenCon.ui Debugger/CpuWidget.cpp Debugger/CpuWidget.h Debugger/CpuWidget.ui diff --git a/pcsx2-qt/Settings/ControllerBindingWidget.cpp b/pcsx2-qt/Settings/ControllerBindingWidget.cpp index fc209d13fd..331f54d0ee 100644 --- a/pcsx2-qt/Settings/ControllerBindingWidget.cpp +++ b/pcsx2-qt/Settings/ControllerBindingWidget.cpp @@ -24,11 +24,14 @@ #include "SettingWidgetBinder.h" #include "ui_USBBindingWidget_Buzz.h" +#include "ui_USBBindingWidget_DenshaCon.h" #include "ui_USBBindingWidget_DrivingForce.h" #include "ui_USBBindingWidget_Gametrak.h" #include "ui_USBBindingWidget_GTForce.h" #include "ui_USBBindingWidget_GunCon2.h" #include "ui_USBBindingWidget_RealPlay.h" +#include "ui_USBBindingWidget_RyojouhenCon.h" +#include "ui_USBBindingWidget_ShinkansenCon.h" #include "ui_USBBindingWidget_TranceVibrator.h" ControllerBindingWidget::ControllerBindingWidget(QWidget* parent, ControllerSettingsWindow* dialog, u32 port) @@ -1391,6 +1394,24 @@ USBBindingWidget* USBBindingWidget::createInstance( Ui::USBBindingWidget_Buzz().setupUi(widget); has_template = true; } + else if (type == "TrainController") + { + if (subtype == 0) + { + Ui::USBBindingWidget_DenshaCon().setupUi(widget); + has_template = true; + } + else if (subtype == 1) + { + Ui::USBBindingWidget_ShinkansenCon().setupUi(widget); + has_template = true; + } + else if (subtype == 2) + { + Ui::USBBindingWidget_RyojouhenCon().setupUi(widget); + has_template = true; + } + } else if (type == "Gametrak") { Ui::USBBindingWidget_Gametrak().setupUi(widget); diff --git a/pcsx2-qt/Settings/USBBindingWidget_DenshaCon.ui b/pcsx2-qt/Settings/USBBindingWidget_DenshaCon.ui new file mode 100644 index 0000000000..e5c34087cf --- /dev/null +++ b/pcsx2-qt/Settings/USBBindingWidget_DenshaCon.ui @@ -0,0 +1,755 @@ + + + USBBindingWidget_DenshaCon + + + + 0 + 0 + 1102 + 611 + + + + + 0 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Face Buttons + + + + + + C + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + B + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + D + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + A + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 0 + + + + + + + + + + + + Hints + + + + + + The Densha Controller Type 2 is a two-handle train master controller with a D-Pad and six buttons. The power axis starts from neutral and has five progressively higher notches of power. The brake axis starts released, and has eight progressively increasing notches plus an Emergency Brake. This controller is compatible with several games and generally maps well to hardware with one or two physical axes with a similar range of notches, such as the modern "Zuiki One Handle MasCon". + + + true + + + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + D-Pad + + + + + + Down + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Left + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Up + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Right + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 0 + + + + + + + + + + + + + + Power Lever + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 200 + 0 + + + + + 200 + 16777215 + + + + PushButton + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + Brake Lever + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 200 + 0 + + + + + 200 + 16777215 + + + + PushButton + + + + + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 400 + 200 + + + + + 400 + 240 + + + + + + + :/images/Denshacon.svg + + + true + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 150 + 0 + + + + Select + + + + + + + 0 + 0 + + + + + 250 + 16777215 + + + + PushButton + + + + + + + + + + + 150 + 0 + + + + Start + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 0 + 0 + + + + + 250 + 16777215 + + + + PushButton + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + + + + + InputBindingWidget + QPushButton +
Settings/InputBindingWidget.h
+
+
+ + + + +
diff --git a/pcsx2-qt/Settings/USBBindingWidget_RyojouhenCon.ui b/pcsx2-qt/Settings/USBBindingWidget_RyojouhenCon.ui new file mode 100644 index 0000000000..f3d9814174 --- /dev/null +++ b/pcsx2-qt/Settings/USBBindingWidget_RyojouhenCon.ui @@ -0,0 +1,762 @@ + + + USBBindingWidget_RyojouhenCon + + + + 0 + 0 + 1102 + 611 + + + + + 0 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + Hints + + + + + + The Ryojōhen Controller is a two-handle train master controller with a D-Pad and seven buttons. The power axis starts from neutral and has four progressively higher notches of power. The brake axis is analogue with three regions representing to release brake pressure, hold brakes at the current pressure, or increase brake pressure. Extending this axis to the extreme triggers the Emergency Brake. This controller is designed for use with Densha De GO! Ryojōhen, and is best used with hardware with two axes, one of which can be easily feathered to increase or decrease brake pressure. + + + true + + + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + 250 + 110 + + + + Door Buttons" + + + + 5 + + + 5 + + + 5 + + + + + + 100 + 0 + + + + Left + + + + + + + 80 + 0 + + + + PushButton + + + + + + + + + + + 100 + 0 + + + + Right + + + + + + + 80 + 0 + + + + PushButton + + + + + + + + + + + + + D-Pad + + + + + + Down + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Right + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Up + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Left + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 0 + + + + + + + + + + + + + + + + 16777215 + 16777215 + + + + Brake Lever + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 150 + 0 + + + + + 200 + 16777215 + + + + PushButton + + + + + + + + + + Power Lever + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 200 + 0 + + + + + 200 + 16777215 + + + + PushButton + + + + + + + + + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 400 + 280 + + + + + 400 + 280 + + + + + + + :/images/RyojouhenCon.svg + + + true + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Face Buttons + + + + + + + 150 + 0 + + + + Select + + + + + + + 0 + 0 + + + + + 250 + 16777215 + + + + PushButton + + + + + + + + + + + 150 + 0 + + + + Start + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 0 + 0 + + + + + 250 + 16777215 + + + + PushButton + + + + + + + + + + Announce + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Camera + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Horn + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 0 + + + + + + + + + + + InputBindingWidget + QPushButton +
Settings/InputBindingWidget.h
+
+
+ + + + +
diff --git a/pcsx2-qt/Settings/USBBindingWidget_ShinkansenCon.ui b/pcsx2-qt/Settings/USBBindingWidget_ShinkansenCon.ui new file mode 100644 index 0000000000..57d2866029 --- /dev/null +++ b/pcsx2-qt/Settings/USBBindingWidget_ShinkansenCon.ui @@ -0,0 +1,737 @@ + + + USBBindingWidget_ShinkansenCon + + + + 0 + 0 + 1102 + 611 + + + + + 0 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + Hints + + + + + + The Shinkansen Controller is a two-handle train master controller with a D-Pad and six buttons. The power axis starts from neutral and has thirteen progressively higher notches of power. The brake axis starts released, and has seven progressively increasing notches plus an Emergency Brake. This controller is designed for use with Densha De GO! San'yō Shinkansen-hen, and is best used with hardware with 14 or more notch settings on an axis. + + + true + + + + + + + + + + + + + + Power Lever + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 200 + 0 + + + + + 200 + 16777215 + + + + PushButton + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + D-Pad + + + + + + Down + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Left + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Up + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + Right + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 0 + + + + + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 400 + 280 + + + + + 400 + 280 + + + + + + + :/images/ShinkansenCon.svg + + + true + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 150 + 0 + + + + Select + + + + + + + 0 + 0 + + + + + 250 + 16777215 + + + + PushButton + + + + + + + + + + + 150 + 0 + + + + Start + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 0 + 0 + + + + + 250 + 16777215 + + + + PushButton + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + + + + Brake Lever + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 200 + 0 + + + + + 200 + 16777215 + + + + PushButton + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Face Buttons + + + + + + C + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + B + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + D + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + A + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 125 + 0 + + + + + 125 + 16777215 + + + + PushButton + + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 0 + + + + + + + + + + + InputBindingWidget + QPushButton +
Settings/InputBindingWidget.h
+
+
+ + + + +
diff --git a/pcsx2-qt/pcsx2-qt.vcxproj b/pcsx2-qt/pcsx2-qt.vcxproj index 748973bc0f..89f4a78558 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj +++ b/pcsx2-qt/pcsx2-qt.vcxproj @@ -439,6 +439,9 @@ Document + + Document + Document @@ -454,6 +457,12 @@ Document + + Document + + + Document + Document diff --git a/pcsx2-qt/pcsx2-qt.vcxproj.filters b/pcsx2-qt/pcsx2-qt.vcxproj.filters index b8a935c3b6..fa3f65bbc8 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj.filters +++ b/pcsx2-qt/pcsx2-qt.vcxproj.filters @@ -705,6 +705,9 @@ Settings + + Settings + Settings @@ -720,6 +723,12 @@ Settings + + Settings + + + Settings + Settings diff --git a/pcsx2-qt/resources/images/Denshacon.svg b/pcsx2-qt/resources/images/Denshacon.svg new file mode 100644 index 0000000000..d1dcc3f1e6 --- /dev/null +++ b/pcsx2-qt/resources/images/Denshacon.svg @@ -0,0 +1,443 @@ + + + +Type 2 ControllerSELECTSTARTBACDType 2 Controller diff --git a/pcsx2-qt/resources/images/RyojouhenCon.svg b/pcsx2-qt/resources/images/RyojouhenCon.svg new file mode 100644 index 0000000000..870e5095b1 --- /dev/null +++ b/pcsx2-qt/resources/images/RyojouhenCon.svg @@ -0,0 +1,543 @@ + + + +SELECTSTARTHORNANNOUNCECAMERARyojouhen Controller diff --git a/pcsx2-qt/resources/images/ShinkansenCon.svg b/pcsx2-qt/resources/images/ShinkansenCon.svg new file mode 100644 index 0000000000..237ce62d33 --- /dev/null +++ b/pcsx2-qt/resources/images/ShinkansenCon.svg @@ -0,0 +1,396 @@ + + + +Shinkansen ControllerSELECTSTARTBACDShinkansen Controller diff --git a/pcsx2-qt/resources/resources.qrc b/pcsx2-qt/resources/resources.qrc index c77881678c..b3225f89a7 100644 --- a/pcsx2-qt/resources/resources.qrc +++ b/pcsx2-qt/resources/resources.qrc @@ -200,6 +200,7 @@ icons/white/svg/window-2-line.svg icons/white/svg/zoom-in-line.svg icons/white/svg/zoom-out-line.svg + images/Denshacon.svg images/Driving_Force.svg images/DualShock_2.svg images/GT_Force.svg @@ -207,5 +208,7 @@ images/Jogcon.svg images/Negcon.svg images/Popn.svg + images/RyojouhenCon.svg + images/ShinkansenCon.svg