mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 19:15:41 +00:00
Launcher: improve first run and missing game data dialogues (bug #4009)
This commit is contained in:
parent
675ba806bf
commit
0a96f065d7
2 changed files with 20 additions and 12 deletions
|
@ -21,6 +21,7 @@
|
||||||
Bug #3812: Wrong multiline tooltips width when word-wrapping is enabled
|
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 #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 #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 #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 #4202: Open .omwaddon files without needing toopen openmw-cs first
|
||||||
Bug #4240: Ash storm origin coordinates and hand shielding animation behavior are incorrect
|
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()
|
void Launcher::MainDialog::createPages()
|
||||||
{
|
{
|
||||||
|
// Avoid creating the widgets twice
|
||||||
|
if (pagesWidget->count() != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
mPlayPage = new PlayPage(this);
|
mPlayPage = new PlayPage(this);
|
||||||
mDataFilesPage = new DataFilesPage(mCfgMgr, mGameSettings, mLauncherSettings, this);
|
mDataFilesPage = new DataFilesPage(mCfgMgr, mGameSettings, mLauncherSettings, this);
|
||||||
mGraphicsPage = new GraphicsPage(mCfgMgr, mEngineSettings, this);
|
mGraphicsPage = new GraphicsPage(mCfgMgr, mEngineSettings, this);
|
||||||
|
@ -166,18 +170,20 @@ Launcher::FirstRunDialogResult Launcher::MainDialog::showFirstRunDialog()
|
||||||
QAbstractButton *skipButton =
|
QAbstractButton *skipButton =
|
||||||
msgBox.addButton(tr("Skip"), QMessageBox::RejectRole);
|
msgBox.addButton(tr("Skip"), QMessageBox::RejectRole);
|
||||||
|
|
||||||
Q_UNUSED(skipButton); // Surpress compiler unused warning
|
|
||||||
|
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
|
|
||||||
if (msgBox.clickedButton() == wizardButton)
|
if (msgBox.clickedButton() == wizardButton)
|
||||||
{
|
{
|
||||||
if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false)) {
|
if (mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false))
|
||||||
return FirstRunDialogResultFailure;
|
|
||||||
} else {
|
|
||||||
return FirstRunDialogResultWizard;
|
return FirstRunDialogResultWizard;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else if (msgBox.clickedButton() == skipButton)
|
||||||
|
{
|
||||||
|
// Don't bother setting up absent game data.
|
||||||
|
if (setup())
|
||||||
|
return FirstRunDialogResultContinue;
|
||||||
|
}
|
||||||
|
return FirstRunDialogResultFailure;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!setup() || !setupGameData()) {
|
if (!setup() || !setupGameData()) {
|
||||||
|
@ -384,22 +390,23 @@ bool Launcher::MainDialog::setupGameData()
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setWindowTitle(tr("Error detecting Morrowind installation"));
|
msgBox.setWindowTitle(tr("Error detecting Morrowind installation"));
|
||||||
msgBox.setIcon(QMessageBox::Warning);
|
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> \
|
msgBox.setText(tr("<br><b>Could not find the Data Files location</b><br><br> \
|
||||||
The directory containing the data files was not found."));
|
The directory containing the data files was not found."));
|
||||||
|
|
||||||
QAbstractButton *wizardButton =
|
QAbstractButton *wizardButton =
|
||||||
msgBox.addButton(tr("Run &Installation Wizard..."), QMessageBox::ActionRole);
|
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();
|
msgBox.exec();
|
||||||
|
|
||||||
if (msgBox.clickedButton() == wizardButton)
|
if (msgBox.clickedButton() == wizardButton)
|
||||||
{
|
{
|
||||||
if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false)) {
|
if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false))
|
||||||
return 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
|
// HACK: Ensure the pages are created, else segfault
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
if (reloadSettings())
|
if (setupGameData() && reloadSettings())
|
||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue