1
Fork 0
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:
Joshua Goins 2022-04-09 16:59:04 -04:00
parent 763a524766
commit 9210400e33

View file

@ -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();