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
@@ -1,6 +1,10 @@
package seng302.visualiser.controllers;
import com.jfoenix.controls.JFXButton;
import java.io.IOException;
import java.net.URL;
import java.util.List;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
@@ -16,11 +20,6 @@ import seng302.gameServer.ServerDescription;
import seng302.utilities.Sounds;
import seng302.visualiser.GameClient;
import java.io.IOException;
import java.net.URL;
import java.util.List;
import java.util.ResourceBundle;
public class StartScreenController implements Initializable{
//--------FXML BEGIN--------//
@@ -34,24 +33,6 @@ public class StartScreenController implements Initializable{
private Logger logger = LoggerFactory.getLogger(StartScreenController.class);
private List<ServerDescription> servers;
private GameClient gameClient;
// public void initialize(URL url, ResourceBundle resourceBundle) {
// Sounds.stopMusic();
// Sounds.stopSoundEffects();
// Sounds.playMenuMusic();
// if (Sounds.isMusicMuted()) {
// muteMusicButton.setText("UnMute Music");
// } else {
// muteMusicButton.setText("Mute Music");
// }
// if (Sounds.isSoundEffectsMuted()) {
// muteSoundsButton.setText("UnMute Sounds");
// } else {
// muteSoundsButton.setText("Mute Sounds");
// }
// Sounds.setMutes();
//// gameClient = new GameClient(holder);
// }
/**
*
@@ -99,6 +80,7 @@ public class StartScreenController implements Initializable{
setInitialDropShadow();
preloadServerListView();
}
public void toggleMusic(ActionEvent actionEvent) {