From 8aec424191b295e51d3f305c20086c08dd41b480 Mon Sep 17 00:00:00 2001 From: rlnilsen <47765059+rlnilsen@users.noreply.github.com> Date: Tue, 22 Oct 2019 01:43:37 +0200 Subject: Controller Settings Dialog: Rename "Advanced" group box to "Common". The only setting inside, "Background Input", doesn't seem advanced to me, but it is used for both GC an Wii input. --- Source/Core/DolphinQt/Config/ControllersWindow.cpp | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'Source/Core/DolphinQt/Config/ControllersWindow.cpp') diff --git a/Source/Core/DolphinQt/Config/ControllersWindow.cpp b/Source/Core/DolphinQt/Config/ControllersWindow.cpp index 304ae7364c..0f2cfc00e3 100644 --- a/Source/Core/DolphinQt/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt/Config/ControllersWindow.cpp @@ -67,7 +67,7 @@ ControllersWindow::ControllersWindow(QWidget* parent) : QDialog(parent) CreateGamecubeLayout(); CreateWiimoteLayout(); - CreateAdvancedLayout(); + CreateCommonLayout(); CreateMainLayout(); LoadSettings(); ConnectWidgets(); @@ -199,15 +199,16 @@ void ControllersWindow::CreateWiimoteLayout() m_wiimote_layout->addWidget(m_wiimote_speaker_data, m_wiimote_layout->rowCount(), 1, 1, -1); } -void ControllersWindow::CreateAdvancedLayout() +void ControllersWindow::CreateCommonLayout() { - m_advanced_box = new QGroupBox(tr("Advanced")); - m_advanced_layout = new QHBoxLayout(); - m_advanced_bg_input = new QCheckBox(tr("Background Input")); + // i18n: This is "common" as in "shared", not the opposite of "uncommon" + m_common_box = new QGroupBox(tr("Common")); + m_common_layout = new QHBoxLayout(); + m_common_bg_input = new QCheckBox(tr("Background Input")); - m_advanced_layout->addWidget(m_advanced_bg_input); + m_common_layout->addWidget(m_common_bg_input); - m_advanced_box->setLayout(m_advanced_layout); + m_common_box->setLayout(m_common_layout); } void ControllersWindow::CreateMainLayout() @@ -217,7 +218,7 @@ void ControllersWindow::CreateMainLayout() layout->addWidget(m_gc_box); layout->addWidget(m_wiimote_box); - layout->addWidget(m_advanced_box); + layout->addWidget(m_common_box); layout->addWidget(m_button_box); WrapInScrollArea(this, layout); @@ -232,7 +233,7 @@ void ControllersWindow::ConnectWidgets() connect(m_wiimote_passthrough, &QRadioButton::toggled, this, &ControllersWindow::OnWiimoteModeChanged); - connect(m_advanced_bg_input, &QCheckBox::toggled, this, &ControllersWindow::SaveSettings); + connect(m_common_bg_input, &QCheckBox::toggled, this, &ControllersWindow::SaveSettings); connect(m_wiimote_continuous_scanning, &QCheckBox::toggled, this, &ControllersWindow::SaveSettings); connect(m_wiimote_real_balance_board, &QCheckBox::toggled, this, @@ -480,7 +481,7 @@ void ControllersWindow::LoadSettings() m_wiimote_speaker_data->setChecked(SConfig::GetInstance().m_WiimoteEnableSpeaker); m_wiimote_continuous_scanning->setChecked(SConfig::GetInstance().m_WiimoteContinuousScanning); - m_advanced_bg_input->setChecked(SConfig::GetInstance().m_BackgroundInput); + m_common_bg_input->setChecked(SConfig::GetInstance().m_BackgroundInput); if (SConfig::GetInstance().m_bt_passthrough_enabled) m_wiimote_passthrough->setChecked(true); @@ -495,7 +496,7 @@ void ControllersWindow::SaveSettings() SConfig::GetInstance().m_WiimoteEnableSpeaker = m_wiimote_speaker_data->isChecked(); SConfig::GetInstance().m_WiimoteContinuousScanning = m_wiimote_continuous_scanning->isChecked(); SConfig::GetInstance().m_bt_passthrough_enabled = m_wiimote_passthrough->isChecked(); - SConfig::GetInstance().m_BackgroundInput = m_advanced_bg_input->isChecked(); + SConfig::GetInstance().m_BackgroundInput = m_common_bg_input->isChecked(); WiimoteReal::ChangeWiimoteSource(WIIMOTE_BALANCE_BOARD, m_wiimote_real_balance_board->isChecked() ? WIIMOTE_SRC_REAL : -- cgit v1.2.3 From 5ff79499a593f651978188f1711728cf67d44a59 Mon Sep 17 00:00:00 2001 From: rlnilsen <47765059+rlnilsen@users.noreply.github.com> Date: Wed, 23 Oct 2019 01:49:48 +0200 Subject: UDPServer: Add configuration UI. Accessed through button "Alternate Input Sources" in the "Controller Settings" dialog. --- Source/Core/DolphinQt/Config/ControllersWindow.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Source/Core/DolphinQt/Config/ControllersWindow.cpp') diff --git a/Source/Core/DolphinQt/Config/ControllersWindow.cpp b/Source/Core/DolphinQt/Config/ControllersWindow.cpp index 0f2cfc00e3..1df7b1d9a7 100644 --- a/Source/Core/DolphinQt/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt/Config/ControllersWindow.cpp @@ -31,6 +31,7 @@ #include "Core/IOS/IOS.h" #include "Core/IOS/USB/Bluetooth/BTReal.h" +#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h" #include "DolphinQt/Config/Mapping/GCPadWiiUConfigDialog.h" #include "DolphinQt/Config/Mapping/MappingWindow.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" @@ -203,10 +204,12 @@ void ControllersWindow::CreateCommonLayout() { // i18n: This is "common" as in "shared", not the opposite of "uncommon" m_common_box = new QGroupBox(tr("Common")); - m_common_layout = new QHBoxLayout(); + m_common_layout = new QVBoxLayout(); m_common_bg_input = new QCheckBox(tr("Background Input")); + m_common_configure_controller_interface = new QPushButton(tr("Alternate Input Sources")); m_common_layout->addWidget(m_common_bg_input); + m_common_layout->addWidget(m_common_configure_controller_interface); m_common_box->setLayout(m_common_layout); } @@ -219,6 +222,7 @@ void ControllersWindow::CreateMainLayout() layout->addWidget(m_gc_box); layout->addWidget(m_wiimote_box); layout->addWidget(m_common_box); + layout->addStretch(); layout->addWidget(m_button_box); WrapInScrollArea(this, layout); @@ -234,6 +238,8 @@ void ControllersWindow::ConnectWidgets() &ControllersWindow::OnWiimoteModeChanged); connect(m_common_bg_input, &QCheckBox::toggled, this, &ControllersWindow::SaveSettings); + connect(m_common_configure_controller_interface, &QPushButton::clicked, this, + &ControllersWindow::OnControllerInterfaceConfigure); connect(m_wiimote_continuous_scanning, &QCheckBox::toggled, this, &ControllersWindow::SaveSettings); connect(m_wiimote_real_balance_board, &QCheckBox::toggled, this, @@ -463,6 +469,14 @@ void ControllersWindow::OnWiimoteConfigure() window->show(); } +void ControllersWindow::OnControllerInterfaceConfigure() +{ + ControllerInterfaceWindow* window = new ControllerInterfaceWindow(this); + window->setAttribute(Qt::WA_DeleteOnClose, true); + window->setWindowModality(Qt::WindowModality::WindowModal); + window->show(); +} + void ControllersWindow::LoadSettings() { for (size_t i = 0; i < m_wiimote_groups.size(); i++) -- cgit v1.2.3