mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 22:17:59 -05:00
Project Mjölnir: Part 2 - Controller Applet
Co-authored-by: Its-Rei <kupfel@gmail.com>
This commit is contained in:
37
src/yuzu/configuration/configure_input_dialog.cpp
Normal file
37
src/yuzu/configuration/configure_input_dialog.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright 2020 yuzu Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "ui_configure_input_dialog.h"
|
||||
#include "yuzu/configuration/configure_input_dialog.h"
|
||||
|
||||
ConfigureInputDialog::ConfigureInputDialog(QWidget* parent, std::size_t max_players,
|
||||
InputCommon::InputSubsystem* input_subsystem)
|
||||
: QDialog(parent), ui(std::make_unique<Ui::ConfigureInputDialog>()),
|
||||
input_widget(new ConfigureInput(this)) {
|
||||
ui->setupUi(this);
|
||||
|
||||
input_widget->Initialize(input_subsystem, max_players);
|
||||
|
||||
ui->inputLayout->addWidget(input_widget);
|
||||
|
||||
RetranslateUI();
|
||||
}
|
||||
|
||||
ConfigureInputDialog::~ConfigureInputDialog() = default;
|
||||
|
||||
void ConfigureInputDialog::ApplyConfiguration() {
|
||||
input_widget->ApplyConfiguration();
|
||||
}
|
||||
|
||||
void ConfigureInputDialog::changeEvent(QEvent* event) {
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
RetranslateUI();
|
||||
}
|
||||
|
||||
QDialog::changeEvent(event);
|
||||
}
|
||||
|
||||
void ConfigureInputDialog::RetranslateUI() {
|
||||
ui->retranslateUi(this);
|
||||
}
|
Reference in New Issue
Block a user