Add cancel option to analog stick configuration

This commit is contained in:
vitor-k 2019-08-31 21:58:07 -03:00
parent 8fa6be5b15
commit ac3a854f45

View file

@ -231,9 +231,11 @@ ConfigureInput::ConfigureInput(QWidget* parent)
});
}
connect(analog_map_stick[analog_id], &QPushButton::clicked, [=]() {
QMessageBox::information(this, tr("Information"),
if (QMessageBox::information(
this, tr("Information"),
tr("After pressing OK, first move your joystick horizontally, "
"and then vertically."));
"and then vertically."),
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) {
HandleClick(analog_map_stick[analog_id],
[=](const Common::ParamPackage& params) {
analogs_param[analog_id] = params;
@ -241,6 +243,7 @@ ConfigureInput::ConfigureInput(QWidget* parent)
Settings::SaveProfile(ui->profile->currentIndex());
},
InputCommon::Polling::DeviceType::Analog);
}
});
}