diff --git a/class/application/Controller$1.class b/class/application/Controller$1.class index 14ed6b8e80e5c4d4891bf3dce388576e82e452ad..cb6164bf35f48e44279460b1f67738084343a204 100644 Binary files a/class/application/Controller$1.class and b/class/application/Controller$1.class differ diff --git a/class/application/Controller$2.class b/class/application/Controller$2.class index c817c8bff08ffebfca784208764feb1e71ef913e..4d2591e15faa0f3fffbff619bf1baccbdaad886a 100644 Binary files a/class/application/Controller$2.class and b/class/application/Controller$2.class differ diff --git a/class/application/Controller$3.class b/class/application/Controller$3.class index cb09ad2228fd51b5be495c3f74989d99b9c7bb93..c9b29953b86bd801c5abe7bb080b6304d68ee361 100644 Binary files a/class/application/Controller$3.class and b/class/application/Controller$3.class differ diff --git a/class/application/Controller$4.class b/class/application/Controller$4.class index 7be8cd0c2a6105a68c88d0b381c75b09f16461ad..cd82e66530250756624ba54ab6ef335fe0ca2962 100644 Binary files a/class/application/Controller$4.class and b/class/application/Controller$4.class differ diff --git a/class/application/Controller$5.class b/class/application/Controller$5.class index 83f1dbfbb51488b8d6e32f2a039e718e05835828..916951d78b8511f603280aaaaab6827552e5c339 100644 Binary files a/class/application/Controller$5.class and b/class/application/Controller$5.class differ diff --git a/class/application/Controller$6.class b/class/application/Controller$6.class index e72b11fa01003560ce841eae7af162e1138aa8da..96ba6f61200760ad0299c7a20e2cb2116fc527e8 100644 Binary files a/class/application/Controller$6.class and b/class/application/Controller$6.class differ diff --git a/class/application/Controller$7.class b/class/application/Controller$7.class index da4393d2da8f308283fe5e903bfc08c0b50d7775..5114eebad1bbbe936eddff14e04368997e701842 100644 Binary files a/class/application/Controller$7.class and b/class/application/Controller$7.class differ diff --git a/class/application/Controller$8.class b/class/application/Controller$8.class index 6fa0e6dc2b31d9564ec196ef51aa2b2d7c82e09d..d15225855fb61543518af353422532735a2d9b2c 100644 Binary files a/class/application/Controller$8.class and b/class/application/Controller$8.class differ diff --git a/class/application/Controller$9.class b/class/application/Controller$9.class index 5323d476f21a32bf359811e493ecfcd095aa42f3..c4731d596c18cac74ce651a0f0797f039c5c1bf6 100644 Binary files a/class/application/Controller$9.class and b/class/application/Controller$9.class differ diff --git a/class/application/Controller.class b/class/application/Controller.class index 249cfc6872d2cf03b4be39a24bee0bad472adc83..11e012d102404782794c62ae5acca1e18aba99dd 100644 Binary files a/class/application/Controller.class and b/class/application/Controller.class differ diff --git a/class/application/Main$1.class b/class/application/Main$1.class index 2ac13e565da71591a65094b4b015f1dfc74bfd9a..9e83ac36f0ef468d6caa998f0dc514fc4a6f132f 100644 Binary files a/class/application/Main$1.class and b/class/application/Main$1.class differ diff --git a/class/application/Main.class b/class/application/Main.class index 0eb546a324fe077cffb18bf2ce74ff197356e6d1..d1179555e3ea2a0bd20f518bad76d71b675cb450 100644 Binary files a/class/application/Main.class and b/class/application/Main.class differ diff --git a/class/application/Settings.class b/class/application/Settings.class index 4f44a6cf7664369814f1b0b89d53a653c8b1297f..3977a5dbcd7bdbffdabcd1a66a4c20c564cd6d24 100644 Binary files a/class/application/Settings.class and b/class/application/Settings.class differ diff --git a/src/application/Controller.java b/src/application/Controller.java index f834fc70cb60a89f287bbd89c7433b08d67726e2..23e6895b76d71ae4060702bb4ffe3ff39d78e334 100644 --- a/src/application/Controller.java +++ b/src/application/Controller.java @@ -7,6 +7,7 @@ import java.util.Locale; import java.util.Random; import java.util.ResourceBundle; +import tools.PathUtils; import achievements.Achievement; import achievements.AchievementHandler; import achievements.Achievement.Status; @@ -129,7 +130,7 @@ public class Controller } handler = new AchievementHandler(stage); - handler.setPath(System.getenv("APPDATA") + "/Deadlocker/UNO/achievements.save"); + handler.setPath(PathUtils.getOSindependentPath() + "/Deadlocker/UNO/achievements.save"); try { handler.loadAchievements(); @@ -1169,7 +1170,7 @@ public class Controller private void createAchievements() { AchievementHandler handler = new AchievementHandler(stage); - handler.setPath(System.getenv("APPDATA") + "/Deadlocker/UNO/achievements.save"); + handler.setPath(PathUtils.getOSindependentPath() + "/Deadlocker/UNO/achievements.save"); handler.addAchievement(new Achievement("Anf�nger", "Gewinne dein erstes Spiel", null, null, Status.LOCKED)); handler.addAchievement(new Achievement("Fortgeschrittener", "Gewinne insgesamt 10 Spiele", null, null, Status.LOCKED, 0, 10, 0)); handler.addAchievement(new Achievement("Experte", "Gewinne insgesamt 50 Spiele", null, null, Status.LOCKED, 0, 50, 0)); @@ -1197,9 +1198,7 @@ public class Controller @FXML private void buttonAchievements() { - Stage newStage = new Stage(); - newStage.setMinHeight(250); - newStage.setMinWidth(250); + Stage newStage = new Stage(); AnchorPane root = new AnchorPane(); @@ -1215,10 +1214,8 @@ public class Controller AnchorPane summary = handler.getSummary(); root.getChildren().add(summary); - root.getChildren().add(list); + root.getChildren().add(list); - newStage.setResizable(false); - AnchorPane.setTopAnchor(summary, 50.0); AnchorPane.setLeftAnchor(summary, 25.0); AnchorPane.setRightAnchor(summary, 50.0); @@ -1230,8 +1227,10 @@ public class Controller root.setStyle("-fx-background-color: #3F3F3F;"); - Scene scene = new Scene(root, 800, 600); + Scene scene = new Scene(root, 600, 600); newStage.setScene(scene); + newStage.setMinHeight(500); + newStage.setMinWidth(600); newStage.setTitle("Achievements"); newStage.initModality(Modality.APPLICATION_MODAL); diff --git a/src/application/Main.java b/src/application/Main.java index ccc76a3e5d3966fc37b7f9ca7562048e949c1f1b..f2a1c4bd0fa9e82da7809d7018a2ef47360f230e 100644 --- a/src/application/Main.java +++ b/src/application/Main.java @@ -1,15 +1,14 @@ package application; -import achievements.Achievement.Status; import javafx.application.Application; import javafx.event.EventHandler; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; -import javafx.scene.SceneAntialiasing; import javafx.scene.image.Image; import javafx.stage.Stage; import javafx.stage.WindowEvent; +import achievements.Achievement.Status; public class Main extends Application { @@ -21,7 +20,7 @@ public class Main extends Application FXMLLoader loader = new FXMLLoader(getClass().getResource("MainGUI.fxml")); Parent root = (Parent)loader.load(); - Scene scene = new Scene(root, 800, 650, false, SceneAntialiasing.BALANCED); + Scene scene = new Scene(root, 800, 650); stage.setResizable(true); stage.setTitle("UNO"); diff --git a/src/application/Settings.java b/src/application/Settings.java index 1fa40c7172cf01078d5c22a4a889120ad0ba506c..a2d852c37e930f0240dc55999c16c31d0c860d0f 100644 --- a/src/application/Settings.java +++ b/src/application/Settings.java @@ -33,8 +33,8 @@ public class Settings implements Serializable public Settings() { - PathUtils.checkFolder(new File(System.getenv("APPDATA") + "/Deadlocker/UNO/")); - File file = new File(System.getenv("APPDATA") + "/Deadlocker/UNO/settings.config"); + PathUtils.checkFolder(new File(PathUtils.getOSindependentPath() + "/Deadlocker/UNO/")); + File file = new File(PathUtils.getOSindependentPath() + "/Deadlocker/UNO/settings.config"); if(!file.exists()) { createStandardValues(); @@ -61,7 +61,7 @@ public class Settings implements Serializable public void save() throws Exception { - FileOutputStream fileOut = new FileOutputStream(System.getenv("APPDATA") + "/Deadlocker/UNO/settings.config"); + FileOutputStream fileOut = new FileOutputStream(PathUtils.getOSindependentPath() + "/Deadlocker/UNO/settings.config"); ObjectOutputStream out = new ObjectOutputStream(fileOut); out.writeObject(this); out.close(); @@ -70,7 +70,7 @@ public class Settings implements Serializable public void load() throws Exception { - FileInputStream fileIn = new FileInputStream(System.getenv("APPDATA") + "/Deadlocker/UNO/settings.config"); + FileInputStream fileIn = new FileInputStream(PathUtils.getOSindependentPath() + "/Deadlocker/UNO/settings.config"); ObjectInputStream in = new ObjectInputStream(fileIn); Settings loaded = (Settings) in.readObject(); in.close();