Added button sounds on hover, click and in the lobby

- Started playing start & lobby sounds
 - Started playing button hover & click sounds

Tags: #story[1249]
This commit is contained in:
Michael Rausch
2017-09-11 19:50:17 +12:00
parent 3d0209300e
commit 131cd80e02
16 changed files with 171 additions and 356 deletions
@@ -0,0 +1,46 @@
package seng302.utilities;
import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
public class BonjourInstallChecker {
private static String INSTALL_URL = "https://support.apple.com/kb/DL999?locale=en_US";
private static String[] INSTALL_DIRECTORIES = {"C:/Program Files/Bonjour", "C:/Program Files (x86)/Bonjour"};
private static Boolean isWindows(){
return System.getProperty("os.name").startsWith("Windows");
}
private static Boolean isBonjourInstalled(){
for (String dir : INSTALL_DIRECTORIES){
File file = new File(dir);
if (file.isDirectory()){
return true;
}
}
return false;
}
public static Boolean isBonjourSupported(){
if (isWindows()){
return isBonjourInstalled();
}
return true;
}
public static void openInstallUrl(){
Runtime rt = Runtime.getRuntime();
try {
rt.exec("rundll32 url.dll,FileProtocolHandler " + INSTALL_URL);
} catch (IOException e) {
e.printStackTrace();
}
}
}