aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_debug_controller.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-08-27 14:58:44 -0400
committerGitHub <noreply@github.com>2020-08-27 14:58:44 -0400
commitc76a188f47b6881fd277ee65ce74bf33491503da (patch)
treee341942ba33f882468837d763004ae7de5fe0053 /src/yuzu/configuration/configure_debug_controller.cpp
parenta8ab0af067131c3fcf3a5a1f387bc56f3f5ca958 (diff)
parent4ca910101fc575c006ac471231a1e74ad31fd68f (diff)
Merge pull request #4530 from Morph1984/mjolnir-p1
Project Mjölnir: Part 1 - Input Rewrite
Diffstat (limited to 'src/yuzu/configuration/configure_debug_controller.cpp')
-rw-r--r--src/yuzu/configuration/configure_debug_controller.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_debug_controller.cpp b/src/yuzu/configuration/configure_debug_controller.cpp
new file mode 100644
index 0000000000..72885b4b88
--- /dev/null
+++ b/src/yuzu/configuration/configure_debug_controller.cpp
@@ -0,0 +1,39 @@
+// Copyright 2020 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "ui_configure_debug_controller.h"
+#include "yuzu/configuration/configure_debug_controller.h"
+
+ConfigureDebugController::ConfigureDebugController(QWidget* parent)
+ : QDialog(parent), ui(std::make_unique<Ui::ConfigureDebugController>()),
+ debug_controller(new ConfigureInputPlayer(this, 9, nullptr, true)) {
+ ui->setupUi(this);
+
+ ui->controllerLayout->addWidget(debug_controller);
+
+ connect(ui->clear_all_button, &QPushButton::clicked, this,
+ [this] { debug_controller->ClearAll(); });
+ connect(ui->restore_defaults_button, &QPushButton::clicked, this,
+ [this] { debug_controller->RestoreDefaults(); });
+
+ RetranslateUI();
+}
+
+ConfigureDebugController::~ConfigureDebugController() = default;
+
+void ConfigureDebugController::ApplyConfiguration() {
+ debug_controller->ApplyConfiguration();
+}
+
+void ConfigureDebugController::changeEvent(QEvent* event) {
+ if (event->type() == QEvent::LanguageChange) {
+ RetranslateUI();
+ }
+
+ QDialog::changeEvent(event);
+}
+
+void ConfigureDebugController::RetranslateUI() {
+ ui->retranslateUi(this);
+}