Injected a simple toggle into the decorator for the window for the sound.

Unsure if this is the best way to do it but not a bad thing to try for now.

tags : #story[1245] #story[1249]
This commit is contained in:
Alistair McIntyre
2017-09-12 13:53:24 +12:00
parent 6d9864e677
commit bc9f0ea924
7 changed files with 80 additions and 43 deletions
+5 -1
View File
@@ -1,6 +1,5 @@
package seng302.utilities;
import javafx.scene.media.AudioClip;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
@@ -45,6 +44,11 @@ public class Sounds {
}
}
public static void toggleAllSounds() {
toggleMuteEffects();
toggleMuteMusic();
}
public static void toggleMuteMusic() {
musicMuted = !musicMuted;
if (musicPlayer != null) {