1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-03 15:09:39 +00:00

Add setting to enable/disabled notification for saved screenshots

This commit is contained in:
elsid 2021-05-25 13:58:16 +02:00
parent 5103120eef
commit 4259f7f230
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40
5 changed files with 32 additions and 2 deletions

View file

@ -213,6 +213,8 @@ bool Launcher::AdvancedPage::loadSettings()
if (screenshotFormatComboBox->findText(screenshotFormatString) == -1) if (screenshotFormatComboBox->findText(screenshotFormatString) == -1)
screenshotFormatComboBox->addItem(screenshotFormatString); screenshotFormatComboBox->addItem(screenshotFormatString);
screenshotFormatComboBox->setCurrentIndex(screenshotFormatComboBox->findText(screenshotFormatString)); screenshotFormatComboBox->setCurrentIndex(screenshotFormatComboBox->findText(screenshotFormatString));
loadSettingBool(notifyOnSavedScreenshotCheckBox, "notify on saved screenshot", "General");
} }
// Testing // Testing
@ -376,6 +378,8 @@ void Launcher::AdvancedPage::saveSettings()
std::string screenshotFormatString = screenshotFormatComboBox->currentText().toLower().toStdString(); std::string screenshotFormatString = screenshotFormatComboBox->currentText().toLower().toStdString();
if (screenshotFormatString != Settings::Manager::getString("screenshot format", "General")) if (screenshotFormatString != Settings::Manager::getString("screenshot format", "General"))
Settings::Manager::setString("screenshot format", "General", screenshotFormatString); Settings::Manager::setString("screenshot format", "General", screenshotFormatString);
saveSettingBool(notifyOnSavedScreenshotCheckBox, "notify on saved screenshot", "General");
} }
// Testing // Testing

View file

@ -226,6 +226,11 @@ namespace
MWBase::Environment::get().getWindowManager()->scheduleMessageBox(std::move(message), MWGui::ShowInDialogueMode_Never); MWBase::Environment::get().getWindowManager()->scheduleMessageBox(std::move(message), MWGui::ShowInDialogueMode_Never);
} }
}; };
struct IgnoreString
{
void operator()(std::string) const {}
};
} }
void OMW::Engine::executeLocalScripts() void OMW::Engine::executeLocalScripts()
@ -685,7 +690,9 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
new SceneUtil::WriteScreenshotToFileOperation( new SceneUtil::WriteScreenshotToFileOperation(
mCfgMgr.getScreenshotPath().string(), mCfgMgr.getScreenshotPath().string(),
Settings::Manager::getString("screenshot format", "General"), Settings::Manager::getString("screenshot format", "General"),
ScheduleNonDialogMessageBox {} Settings::Manager::getBool("notify on saved screenshot", "General")
? std::function(ScheduleNonDialogMessageBox {})
: std::function(IgnoreString {})
) )
); );

View file

@ -59,3 +59,12 @@ texture mipmap
Set the texture mipmap type to control the method mipmaps are created. Set the texture mipmap type to control the method mipmaps are created.
Mipmapping is a way of reducing the processing power needed during minification Mipmapping is a way of reducing the processing power needed during minification
by pregenerating a series of smaller textures. by pregenerating a series of smaller textures.
notify on saved screenshot
--------------
:Type: boolean
:Range: True/False
:Default: False
Show message box when screenshot is saved to a file.

View file

@ -386,6 +386,9 @@ texture min filter = linear
# Texture mipmap type. (none, nearest, or linear). # Texture mipmap type. (none, nearest, or linear).
texture mipmap = nearest texture mipmap = nearest
# Show message box when screenshot is saved to a file.
notify on saved screenshot = false
[Shaders] [Shaders]
# Force rendering with shaders. By default, only bump-mapped objects will use shaders. # Force rendering with shaders. By default, only bump-mapped objects will use shaders.

View file

@ -1121,7 +1121,7 @@ True: In non-combat mode camera is positioned behind the character's shoulder. C
<layout class="QVBoxLayout" name="otherGroupVerticalLayout"> <layout class="QVBoxLayout" name="otherGroupVerticalLayout">
<item> <item>
<layout class="QHBoxLayout" name="screenshotFormatLayout"> <layout class="QHBoxLayout" name="screenshotFormatLayout">
<item alignment="Qt::AlignRight"> <item>
<widget class="QLabel" name="screenshotFormatLabel"> <widget class="QLabel" name="screenshotFormatLabel">
<property name="text"> <property name="text">
<string>Screenshot Format</string> <string>Screenshot Format</string>
@ -1149,6 +1149,13 @@ True: In non-combat mode camera is positioned behind the character's shoulder. C
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QCheckBox" name="notifyOnSavedScreenshotCheckBox">
<property name="text">
<string>Notify on saved screenshot</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>