This commit is contained in:
DanielSvoboda 2024-08-28 14:18:42 -03:00
parent d078a8ff05
commit 13ea39b515
1 changed files with 20 additions and 15 deletions

View File

@ -597,7 +597,8 @@ void MainWindow::BootGame() {
int nFiles = fileNames.size();
if (nFiles > 1) {
QMessageBox::critical(nullptr, tr("Game Boot"), QString(tr("Only one file can be selected!")));
QMessageBox::critical(nullptr, tr("Game Boot"),
QString(tr("Only one file can be selected!")));
} else {
std::filesystem::path path(fileNames[0].toStdString());
#ifdef _WIN64
@ -629,8 +630,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
double appD = game_app_version.toDouble();
double pkgD = pkg_app_version.toDouble();
if (pkgD == appD) {
msgBox.setText(
QString(tr("Patch detected!\nPKG and Game versions match!: %1\nWould you like ")+
msgBox.setText(QString(tr("Patch detected!\nPKG and Game versions match!: "
"%1\nWould you like ") +
tr("to overwrite?"))
.arg(pkg_app_version));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
@ -643,7 +644,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::No);
} else {
msgBox.setText(QString(tr("Patch detected!\nGame is installed: %1\nWould you like ")+
msgBox.setText(
QString(tr("Patch detected!\nGame is installed: %1\nWould you like ") +
tr("to install Patch: %2?"))
.arg(game_app_version, pkg_app_version));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
@ -656,7 +658,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
return;
}
} else {
msgBox.setText(QString(tr("Game already installed\n%1\nWould you like to overwrite?"))
msgBox.setText(
QString(tr("Game already installed\n%1\nWould you like to overwrite?"))
.arg(QString::fromStdString(extract_path.string())));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::No);
@ -701,7 +704,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
QString path = QString::fromStdString(Config::getGameInstallDir());
QMessageBox extractMsgBox(this);
extractMsgBox.setWindowTitle(tr("Extraction Finished"));
extractMsgBox.setText(QString(tr("Game successfully installed at %1")).arg(path));
extractMsgBox.setText(
QString(tr("Game successfully installed at %1")).arg(path));
extractMsgBox.addButton(QMessageBox::Ok);
extractMsgBox.setDefaultButton(QMessageBox::Ok);
connect(&extractMsgBox, &QMessageBox::buttonClicked, this,
@ -722,7 +726,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
dialog.exec();
}
} else {
QMessageBox::critical(this, tr("PKG ERROR"), tr("File doesn't appear to be a valid PKG file"));
QMessageBox::critical(this, tr("PKG ERROR"),
tr("File doesn't appear to be a valid PKG file"));
}
}