Add option to mute notification sounds altogether. (#6390)
This commit is contained in:
@@ -131,7 +131,7 @@ void Emit(Options notification) {
|
||||
notification.remainingTime = CVarGetFloat(CVAR_SETTING("Notifications.Duration"), 10.0f);
|
||||
}
|
||||
notifications.push_back(notification);
|
||||
if (!notification.mute) {
|
||||
if (!notification.mute && !CVarGetInteger(CVAR_SETTING("Notifications.Mute"), 0)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
@@ -520,6 +520,10 @@ void SohMenu::AddMenuSettings() {
|
||||
});
|
||||
})
|
||||
.Options(ButtonOptions().Tooltip("Displays a test notification."));
|
||||
AddWidget(path, "Mute Notification Sound", WIDGET_CVAR_CHECKBOX)
|
||||
.CVar(CVAR_SETTING("Notifications.Mute"))
|
||||
.RaceDisable(false)
|
||||
.Options(CheckboxOptions().Tooltip("Prevent notifications from playing a sound."));
|
||||
|
||||
// Mod Menu
|
||||
path.sidebarName = "Mod Menu";
|
||||
|
||||
Reference in New Issue
Block a user