mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
Add setting to enable/disabled notification for saved screenshots
This commit is contained in:
parent
5103120eef
commit
4259f7f230
@ -213,6 +213,8 @@ bool Launcher::AdvancedPage::loadSettings()
|
||||
if (screenshotFormatComboBox->findText(screenshotFormatString) == -1)
|
||||
screenshotFormatComboBox->addItem(screenshotFormatString);
|
||||
screenshotFormatComboBox->setCurrentIndex(screenshotFormatComboBox->findText(screenshotFormatString));
|
||||
|
||||
loadSettingBool(notifyOnSavedScreenshotCheckBox, "notify on saved screenshot", "General");
|
||||
}
|
||||
|
||||
// Testing
|
||||
@ -376,6 +378,8 @@ void Launcher::AdvancedPage::saveSettings()
|
||||
std::string screenshotFormatString = screenshotFormatComboBox->currentText().toLower().toStdString();
|
||||
if (screenshotFormatString != Settings::Manager::getString("screenshot format", "General"))
|
||||
Settings::Manager::setString("screenshot format", "General", screenshotFormatString);
|
||||
|
||||
saveSettingBool(notifyOnSavedScreenshotCheckBox, "notify on saved screenshot", "General");
|
||||
}
|
||||
|
||||
// Testing
|
||||
|
@ -226,6 +226,11 @@ namespace
|
||||
MWBase::Environment::get().getWindowManager()->scheduleMessageBox(std::move(message), MWGui::ShowInDialogueMode_Never);
|
||||
}
|
||||
};
|
||||
|
||||
struct IgnoreString
|
||||
{
|
||||
void operator()(std::string) const {}
|
||||
};
|
||||
}
|
||||
|
||||
void OMW::Engine::executeLocalScripts()
|
||||
@ -685,7 +690,9 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
||||
new SceneUtil::WriteScreenshotToFileOperation(
|
||||
mCfgMgr.getScreenshotPath().string(),
|
||||
Settings::Manager::getString("screenshot format", "General"),
|
||||
ScheduleNonDialogMessageBox {}
|
||||
Settings::Manager::getBool("notify on saved screenshot", "General")
|
||||
? std::function(ScheduleNonDialogMessageBox {})
|
||||
: std::function(IgnoreString {})
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -59,3 +59,12 @@ texture mipmap
|
||||
Set the texture mipmap type to control the method mipmaps are created.
|
||||
Mipmapping is a way of reducing the processing power needed during minification
|
||||
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.
|
||||
|
@ -386,6 +386,9 @@ texture min filter = linear
|
||||
# Texture mipmap type. (none, nearest, or linear).
|
||||
texture mipmap = nearest
|
||||
|
||||
# Show message box when screenshot is saved to a file.
|
||||
notify on saved screenshot = false
|
||||
|
||||
[Shaders]
|
||||
|
||||
# Force rendering with shaders. By default, only bump-mapped objects will use shaders.
|
||||
|
@ -1121,7 +1121,7 @@ True: In non-combat mode camera is positioned behind the character's shoulder. C
|
||||
<layout class="QVBoxLayout" name="otherGroupVerticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="screenshotFormatLayout">
|
||||
<item alignment="Qt::AlignRight">
|
||||
<item>
|
||||
<widget class="QLabel" name="screenshotFormatLabel">
|
||||
<property name="text">
|
||||
<string>Screenshot Format</string>
|
||||
@ -1149,6 +1149,13 @@ True: In non-combat mode camera is positioned behind the character's shoulder. C
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="notifyOnSavedScreenshotCheckBox">
|
||||
<property name="text">
|
||||
<string>Notify on saved screenshot</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user