ControllerEmu: Use enum instead of bool for translatability

This commit is contained in:
JosJuice
2018-04-10 17:22:30 +02:00
parent 3f13dbe087
commit 7ed28297b2
23 changed files with 123 additions and 77 deletions

View File

@ -82,8 +82,9 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con
button->setMinimumWidth(100);
button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
const QString translated_name = control->translate ? tr(control->ui_name.c_str()) :
QString::fromStdString(control->ui_name);
const bool translate = control->translate == ControllerEmu::Translate;
const QString translated_name =
translate ? tr(control->ui_name.c_str()) : QString::fromStdString(control->ui_name);
form_layout->addRow(translated_name, button);
auto* control_ref = control->control_ref.get();