mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Merge remote-tracking branch 'corristo/openmw-36' into openmw-36
This commit is contained in:
commit
79e6156b4f
3 changed files with 16 additions and 8 deletions
|
@ -59,14 +59,16 @@ int main(int argc, char *argv[])
|
|||
|
||||
Launcher::MainDialog mainWin;
|
||||
|
||||
if (!mainWin.showFirstRunDialog())
|
||||
Launcher::FirstRunDialogResult result = mainWin.showFirstRunDialog();
|
||||
if (result == Launcher::FirstRunDialogResultFailure)
|
||||
return 0;
|
||||
|
||||
// if (!mainWin.setup()) {
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
mainWin.show();
|
||||
if (result == Launcher::FirstRunDialogResultContinue)
|
||||
mainWin.show();
|
||||
|
||||
int returnValue = app.exec();
|
||||
SDL_Quit();
|
||||
|
|
|
@ -148,10 +148,10 @@ void Launcher::MainDialog::createPages()
|
|||
|
||||
}
|
||||
|
||||
bool Launcher::MainDialog::showFirstRunDialog()
|
||||
Launcher::FirstRunDialogResult Launcher::MainDialog::showFirstRunDialog()
|
||||
{
|
||||
if (!setupLauncherSettings())
|
||||
return false;
|
||||
return FirstRunDialogResultFailure;
|
||||
|
||||
if (mLauncherSettings.value(QString("General/firstrun"), QString("true")) == QLatin1String("true"))
|
||||
{
|
||||
|
@ -176,14 +176,14 @@ bool Launcher::MainDialog::showFirstRunDialog()
|
|||
if (msgBox.clickedButton() == wizardButton)
|
||||
{
|
||||
if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false)) {
|
||||
return false;
|
||||
return FirstRunDialogResultFailure;
|
||||
} else {
|
||||
return true;
|
||||
return FirstRunDialogResultWizard;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return setup();
|
||||
return setup() ? FirstRunDialogResultContinue : FirstRunDialogResultFailure;
|
||||
}
|
||||
|
||||
bool Launcher::MainDialog::setup()
|
||||
|
|
|
@ -31,6 +31,12 @@ namespace Launcher
|
|||
class UnshieldThread;
|
||||
class SettingsPage;
|
||||
|
||||
typedef enum {
|
||||
FirstRunDialogResultFailure,
|
||||
FirstRunDialogResultContinue,
|
||||
FirstRunDialogResultWizard
|
||||
} FirstRunDialogResult;
|
||||
|
||||
#ifndef WIN32
|
||||
bool expansions(Launcher::UnshieldThread& cd);
|
||||
#endif
|
||||
|
@ -44,7 +50,7 @@ namespace Launcher
|
|||
~MainDialog();
|
||||
|
||||
bool setup();
|
||||
bool showFirstRunDialog();
|
||||
FirstRunDialogResult showFirstRunDialog();
|
||||
|
||||
bool reloadSettings();
|
||||
bool writeSettings();
|
||||
|
|
Loading…
Reference in a new issue