diff --git a/CHANGELOG.md b/CHANGELOG.md index b26b5289..bfc0d03d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp ### Added - Add option to sort Locations and Layouts lists by value, rather than alphabetically. - Add color space settings for exported images. +- Add setting to disable the project loading screen. ### Changed - Separate `File > Duplicate Current Map/Layout` into two options to allow duplicating the current layout when a map is open. diff --git a/forms/preferenceeditor.ui b/forms/preferenceeditor.ui index 15584ae4..8b36a441 100644 --- a/forms/preferenceeditor.ui +++ b/forms/preferenceeditor.ui @@ -54,7 +54,7 @@ - + <html><head/><body><p>If checked, Porymap will automatically alert you on startup if a new release is available</p></body></html> @@ -84,28 +84,28 @@ - + Application Theme - + false - + Image Export Color Space - + <html><head/><body><p>The color space to use for exported images. If &quot;---&quot; is set, no color space will be used for the exported image. For details on each color space, see Qt's manual page for QColorSpace.</p></body></html> @@ -115,6 +115,16 @@ + + + + <html><head/><body><p>If checked, a loading screen with progress information will appear when a project is opened.</p></body></html> + + + Show project loading screen + + + diff --git a/include/config.h b/include/config.h index ae1d1d2c..8e363914 100644 --- a/include/config.h +++ b/include/config.h @@ -135,6 +135,7 @@ public: bool eventDeleteWarningDisabled; bool eventOverlayEnabled; bool checkForUpdates; + bool showProjectLoadingScreen; QDateTime lastUpdateCheckTime; QVersionNumber lastUpdateCheckVersion; QMap rateLimitTimes; diff --git a/src/config.cpp b/src/config.cpp index b2c2d9dc..9b5677ab 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -364,6 +364,7 @@ void PorymapConfig::reset() { this->eventDeleteWarningDisabled = false; this->eventOverlayEnabled = false; this->checkForUpdates = true; + this->showProjectLoadingScreen = true; this->lastUpdateCheckTime = QDateTime(); this->lastUpdateCheckVersion = porymapVersion; this->rateLimitTimes.clear(); @@ -528,6 +529,8 @@ void PorymapConfig::parseConfigKeyValue(QString key, QString value) { this->eventOverlayEnabled = getConfigBool(key, value); } else if (key == "check_for_updates") { this->checkForUpdates = getConfigBool(key, value); + } else if (key == "show_project_loading_screen") { + this->showProjectLoadingScreen = getConfigBool(key, value); } else if (key == "last_update_check_time") { this->lastUpdateCheckTime = QDateTime::fromString(value).toLocalTime(); } else if (key == "last_update_check_version") { @@ -652,6 +655,7 @@ QMap PorymapConfig::getKeyValueMap() { map.insert("event_delete_warning_disabled", QString::number(this->eventDeleteWarningDisabled)); map.insert("event_overlay_enabled", QString::number(this->eventOverlayEnabled)); map.insert("check_for_updates", QString::number(this->checkForUpdates)); + map.insert("show_project_loading_screen", QString::number(this->showProjectLoadingScreen)); map.insert("last_update_check_time", this->lastUpdateCheckTime.toUTC().toString()); map.insert("last_update_check_version", this->lastUpdateCheckVersion.toString()); for (auto i = this->rateLimitTimes.cbegin(), end = this->rateLimitTimes.cend(); i != end; i++){ diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ea7ef706..318601a8 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -796,7 +796,7 @@ bool MainWindow::openProject(QString dir, bool initial) { const QString openMessage = QString("Opening %1").arg(projectString); logInfo(openMessage); - porysplash->start(); + if (porymapConfig.showProjectLoadingScreen) porysplash->start(); porysplash->showLoadingMessage("config"); if (!projectConfig.load(dir) || !userConfig.load(dir)) { diff --git a/src/ui/preferenceeditor.cpp b/src/ui/preferenceeditor.cpp index 326197e8..7fd85ff9 100644 --- a/src/ui/preferenceeditor.cpp +++ b/src/ui/preferenceeditor.cpp @@ -91,6 +91,7 @@ void PreferenceEditor::updateFields() { ui->checkBox_OpenRecentProject->setChecked(porymapConfig.reopenOnLaunch); ui->checkBox_CheckForUpdates->setChecked(porymapConfig.checkForUpdates); ui->checkBox_DisableEventWarning->setChecked(porymapConfig.eventDeleteWarningDisabled); + ui->checkBox_ShowProjectLoadingScreen->setChecked(porymapConfig.showProjectLoadingScreen); if (porymapConfig.scriptAutocompleteMode == ScriptAutocompleteMode::MapOnly) { ui->radioButton_AutocompleteMapScripts->setChecked(true); @@ -136,6 +137,7 @@ void PreferenceEditor::saveFields() { porymapConfig.reopenOnLaunch = ui->checkBox_OpenRecentProject->isChecked(); porymapConfig.checkForUpdates = ui->checkBox_CheckForUpdates->isChecked(); porymapConfig.eventDeleteWarningDisabled = ui->checkBox_DisableEventWarning->isChecked(); + porymapConfig.showProjectLoadingScreen = ui->checkBox_ShowProjectLoadingScreen->isChecked(); porymapConfig.statusBarLogTypes.clear(); if (ui->checkBox_StatusErrors->isChecked()) porymapConfig.statusBarLogTypes.insert(LogType::LOG_ERROR);