mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Launcher: improve first run and missing game data dialogues (bug #4009)
This commit is contained in:
parent
675ba806bf
commit
0a96f065d7
@ -21,6 +21,7 @@
|
||||
Bug #3812: Wrong multiline tooltips width when word-wrapping is enabled
|
||||
Bug #3894: Hostile spell effects not detected/present on first frame of OnPCHitMe
|
||||
Bug #3977: Non-ASCII characters in object ID's are not supported
|
||||
Bug #4009: Launcher does not show data files on the first run after installing
|
||||
Bug #4077: Enchanted items are not recharged if they are not in the player's inventory
|
||||
Bug #4202: Open .omwaddon files without needing toopen openmw-cs first
|
||||
Bug #4240: Ash storm origin coordinates and hand shielding animation behavior are incorrect
|
||||
|
@ -116,6 +116,10 @@ void Launcher::MainDialog::createIcons()
|
||||
|
||||
void Launcher::MainDialog::createPages()
|
||||
{
|
||||
// Avoid creating the widgets twice
|
||||
if (pagesWidget->count() != 0)
|
||||
return;
|
||||
|
||||
mPlayPage = new PlayPage(this);
|
||||
mDataFilesPage = new DataFilesPage(mCfgMgr, mGameSettings, mLauncherSettings, this);
|
||||
mGraphicsPage = new GraphicsPage(mCfgMgr, mEngineSettings, this);
|
||||
@ -166,18 +170,20 @@ Launcher::FirstRunDialogResult Launcher::MainDialog::showFirstRunDialog()
|
||||
QAbstractButton *skipButton =
|
||||
msgBox.addButton(tr("Skip"), QMessageBox::RejectRole);
|
||||
|
||||
Q_UNUSED(skipButton); // Surpress compiler unused warning
|
||||
|
||||
msgBox.exec();
|
||||
|
||||
if (msgBox.clickedButton() == wizardButton)
|
||||
{
|
||||
if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false)) {
|
||||
return FirstRunDialogResultFailure;
|
||||
} else {
|
||||
if (mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false))
|
||||
return FirstRunDialogResultWizard;
|
||||
}
|
||||
}
|
||||
else if (msgBox.clickedButton() == skipButton)
|
||||
{
|
||||
// Don't bother setting up absent game data.
|
||||
if (setup())
|
||||
return FirstRunDialogResultContinue;
|
||||
}
|
||||
return FirstRunDialogResultFailure;
|
||||
}
|
||||
|
||||
if (!setup() || !setupGameData()) {
|
||||
@ -384,22 +390,23 @@ bool Launcher::MainDialog::setupGameData()
|
||||
QMessageBox msgBox;
|
||||
msgBox.setWindowTitle(tr("Error detecting Morrowind installation"));
|
||||
msgBox.setIcon(QMessageBox::Warning);
|
||||
msgBox.setStandardButtons(QMessageBox::Cancel);
|
||||
msgBox.setStandardButtons(QMessageBox::NoButton);
|
||||
msgBox.setText(tr("<br><b>Could not find the Data Files location</b><br><br> \
|
||||
The directory containing the data files was not found."));
|
||||
|
||||
QAbstractButton *wizardButton =
|
||||
msgBox.addButton(tr("Run &Installation Wizard..."), QMessageBox::ActionRole);
|
||||
QAbstractButton *skipButton =
|
||||
msgBox.addButton(tr("Skip"), QMessageBox::RejectRole);
|
||||
|
||||
Q_UNUSED(skipButton); // Supress compiler unused warning
|
||||
|
||||
msgBox.exec();
|
||||
|
||||
if (msgBox.clickedButton() == wizardButton)
|
||||
{
|
||||
if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false)) {
|
||||
if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false))
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -582,7 +589,7 @@ void Launcher::MainDialog::wizardFinished(int exitCode, QProcess::ExitStatus exi
|
||||
// HACK: Ensure the pages are created, else segfault
|
||||
setup();
|
||||
|
||||
if (reloadSettings())
|
||||
if (setupGameData() && reloadSettings())
|
||||
show();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user