mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 19:57:45 +00:00
Properly set parent of install game window
Now it won't magically disappear and confuse people who don't see it popped up under the main window.
This commit is contained in:
parent
763a524766
commit
9210400e33
1 changed files with 17 additions and 17 deletions
34
src/main.cpp
34
src/main.cpp
|
@ -88,26 +88,26 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!QDir(c.getProfile(c.defaultProfileIndex).gamePath).exists()) {
|
|
||||||
auto messageBox = new QMessageBox(QMessageBox::Information, "No Game Found", "No game was found to be installed yet. Would you like to install FFXIV now?");
|
|
||||||
|
|
||||||
auto installButton = messageBox->addButton("Install Game", QMessageBox::HelpRole);
|
|
||||||
c.connect(installButton, &QPushButton::clicked, [&c, messageBox] {
|
|
||||||
installGame(c, [messageBox, &c] {
|
|
||||||
c.readGameVersion();
|
|
||||||
|
|
||||||
messageBox->close();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
messageBox->addButton(QMessageBox::StandardButton::No);
|
|
||||||
|
|
||||||
messageBox->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
LauncherWindow w(c);
|
LauncherWindow w(c);
|
||||||
if(!parser.isSet(noguiOption)) {
|
if(!parser.isSet(noguiOption)) {
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
|
if(!QDir(c.getProfile(c.defaultProfileIndex).gamePath).exists()) {
|
||||||
|
auto messageBox = new QMessageBox(QMessageBox::Information, "No Game Found", "No game was found to be installed yet. Would you like to install FFXIV now?", QMessageBox::NoButton, &w);
|
||||||
|
|
||||||
|
auto installButton = messageBox->addButton("Install Game", QMessageBox::HelpRole);
|
||||||
|
c.connect(installButton, &QPushButton::clicked, [&c, messageBox] {
|
||||||
|
installGame(c, [messageBox, &c] {
|
||||||
|
c.readGameVersion();
|
||||||
|
|
||||||
|
messageBox->close();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
messageBox->addButton(QMessageBox::StandardButton::No);
|
||||||
|
|
||||||
|
messageBox->show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
|
Loading…
Add table
Reference in a new issue