Added functionality of option of highlightsound on whisper (#692)

Fixes #640
This commit is contained in:
apa420 2018-08-29 00:30:11 +02:00 committed by pajlada
parent 113cfd69b0
commit c5d5825b5a
3 changed files with 10 additions and 0 deletions

View file

@ -578,6 +578,12 @@ void TwitchMessageBuilder::parseHighlights(bool isPastMsg)
2500);
}
}
if (this->args.isReceivedWhisper &&
getSettings()->highlightSoundOnWhisper) {
if (!hasFocus || getSettings()->highlightAlwaysPlaySound) {
player->play();
}
}
}
}

View file

@ -120,6 +120,8 @@ public:
BoolSetting enableHighlightTaskbar = {"/highlighting/enableTaskbarFlashing",
true};
BoolSetting customHighlightSound = {"/highlighting/useCustomSound", false};
BoolSetting highlightSoundOnWhisper = {
"/highlighting/highlightSoundOnWhisper", false};
/// Logging
BoolSetting enableLogging = {"/logging/enabled", false};

View file

@ -149,6 +149,8 @@ HighlightingPage::HighlightingPage()
layout.append(createCheckBox(ALWAYS_PLAY,
getSettings()->highlightAlwaysPlaySound));
layout.append(createCheckBox(("Notification on whisper"),
getSettings()->highlightSoundOnWhisper));
}
// ---- misc