mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 10:42:47 +01:00
yuzu/configuration/configure_input: Mark controller type names as translateable
These are user-facing strings, so they should be localizable.
This commit is contained in:
parent
7e650088dd
commit
d81d4a0f68
1 changed files with 8 additions and 5 deletions
|
@ -75,8 +75,8 @@ ConfigureInput::ConfigureInput(QWidget* parent)
|
||||||
};
|
};
|
||||||
|
|
||||||
for (auto* controller_box : players_controller) {
|
for (auto* controller_box : players_controller) {
|
||||||
controller_box->addItems({"None", "Pro Controller", "Dual Joycons", "Single Right Joycon",
|
controller_box->addItems({tr("None"), tr("Pro Controller"), tr("Dual Joycons"),
|
||||||
"Single Left Joycon"});
|
tr("Single Right Joycon"), tr("Single Left Joycon")});
|
||||||
}
|
}
|
||||||
|
|
||||||
this->loadConfiguration();
|
this->loadConfiguration();
|
||||||
|
@ -85,9 +85,10 @@ ConfigureInput::ConfigureInput(QWidget* parent)
|
||||||
connect(ui->restore_defaults_button, &QPushButton::pressed, this,
|
connect(ui->restore_defaults_button, &QPushButton::pressed, this,
|
||||||
&ConfigureInput::restoreDefaults);
|
&ConfigureInput::restoreDefaults);
|
||||||
|
|
||||||
for (auto* enabled : players_controller)
|
for (auto* enabled : players_controller) {
|
||||||
connect(enabled, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
connect(enabled, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||||
&ConfigureInput::updateUIEnabled);
|
&ConfigureInput::updateUIEnabled);
|
||||||
|
}
|
||||||
connect(ui->use_docked_mode, &QCheckBox::stateChanged, this, &ConfigureInput::updateUIEnabled);
|
connect(ui->use_docked_mode, &QCheckBox::stateChanged, this, &ConfigureInput::updateUIEnabled);
|
||||||
connect(ui->handheld_connected, &QCheckBox::stateChanged, this,
|
connect(ui->handheld_connected, &QCheckBox::stateChanged, this,
|
||||||
&ConfigureInput::updateUIEnabled);
|
&ConfigureInput::updateUIEnabled);
|
||||||
|
@ -147,10 +148,12 @@ void ConfigureInput::updateUIEnabled() {
|
||||||
bool hit_disabled = false;
|
bool hit_disabled = false;
|
||||||
for (auto* player : players_controller) {
|
for (auto* player : players_controller) {
|
||||||
player->setDisabled(hit_disabled);
|
player->setDisabled(hit_disabled);
|
||||||
if (hit_disabled)
|
if (hit_disabled) {
|
||||||
player->setCurrentIndex(0);
|
player->setCurrentIndex(0);
|
||||||
if (!hit_disabled && player->currentIndex() == 0)
|
}
|
||||||
|
if (!hit_disabled && player->currentIndex() == 0) {
|
||||||
hit_disabled = true;
|
hit_disabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (std::size_t i = 0; i < players_controller.size(); ++i) {
|
for (std::size_t i = 0; i < players_controller.size(); ++i) {
|
||||||
|
|
Loading…
Reference in a new issue