Add an option to disable Autosave Notification (#6081)
This commit is contained in:
@@ -44,10 +44,12 @@ static void Autosave_PerformSave() {
|
|||||||
Play_PerformSave(gPlayState);
|
Play_PerformSave(gPlayState);
|
||||||
|
|
||||||
// Send notification
|
// Send notification
|
||||||
|
if (CVarGetInteger(CVAR_ENHANCEMENT("AutosaveNotification"), 1)) {
|
||||||
Notification::Emit({
|
Notification::Emit({
|
||||||
.message = "Game autosaved",
|
.message = "Game autosaved",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void Autosave_IntervalSave() {
|
static void Autosave_IntervalSave() {
|
||||||
// Check if the interval has passed in minutes.
|
// Check if the interval has passed in minutes.
|
||||||
|
|||||||
@@ -160,6 +160,12 @@ void SohMenu::AddMenuEnhancements() {
|
|||||||
"autosave will wait if the game is paused in any way (dialogue, pause screen up, cutscenes, "
|
"autosave will wait if the game is paused in any way (dialogue, pause screen up, cutscenes, "
|
||||||
"etc.).\n\n"
|
"etc.).\n\n"
|
||||||
"The soft-reset save will *not* trigger in cutscene maps like the Chamber of Sages!"));
|
"The soft-reset save will *not* trigger in cutscene maps like the Chamber of Sages!"));
|
||||||
|
AddWidget(path, "Notification on Autosave", WIDGET_CVAR_CHECKBOX)
|
||||||
|
.CVar(CVAR_ENHANCEMENT("AutosaveNotification"))
|
||||||
|
.PreFunc([](WidgetInfo& info) { info.isHidden = !CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), 0); })
|
||||||
|
.RaceDisable(false)
|
||||||
|
.Options(CheckboxOptions().DefaultValue(true).Tooltip("Show a notification when the game is autosaved."));
|
||||||
|
|
||||||
AddWidget(path, "Remember Save Location", WIDGET_CVAR_CHECKBOX)
|
AddWidget(path, "Remember Save Location", WIDGET_CVAR_CHECKBOX)
|
||||||
.CVar(CVAR_ENHANCEMENT("RememberSaveLocation"))
|
.CVar(CVAR_ENHANCEMENT("RememberSaveLocation"))
|
||||||
.Options(CheckboxOptions().Tooltip(
|
.Options(CheckboxOptions().Tooltip(
|
||||||
|
|||||||
Reference in New Issue
Block a user