diff --git a/MainMenu.java b/MainMenu.java index 50aeff0b52aa3384f53a1ae706faf77ecb51b32e..bbebcd1760f74bef05e22e015abaf6db291bbdff 100644 --- a/MainMenu.java +++ b/MainMenu.java @@ -101,35 +101,35 @@ public class MainMenu extends Application { } private Parent createStartContent() throws FileNotFoundException { - // Erstelle pane, die alle ui enthält - Pane root = new Pane(); - root.setPrefSize(900, 600); - - final Image background = new Image(readFoto("Images/snakeBG.png")); - final ImageView background_node = new ImageView(background); - - - ContentFrame frame1 = new ContentFrame(createStartContent()); - - HBox startInfoBox = new HBox(frame1); - startInfoBox.setTranslateX(root.getWidth()/2); - startInfoBox.setTranslateY(root.getHeight()/2); - - - startBox = new VBox(10, - new MenuItem("Slug"), - new MenuItem("Worm"), - new MenuItem("Python")); - startBox.setAlignment(Pos.TOP_CENTER); - startBox.setTranslateX(360); - startBox.setTranslateY(300); - - - getMenuItem(0).setActive(true); - root.getChildren().addAll(background_node, startBox/); - return root; - } + Pane root = new Pane(); + root.setPrefSize(900, 600); + + final Image background = new Image(readFoto("Images/snakeBG.png")); + final ImageView background_node = new ImageView(background); + + + ContentFrame frame1 = new ContentFrame(createStartContent()); + + HBox startInfoBox = new HBox(frame1); + startInfoBox.setTranslateX(root.getWidth()/2); + startInfoBox.setTranslateY(root.getHeight()/2); + + + startBox = new VBox(10, + new MenuItem("Slug"), + new MenuItem("Worm"), + new MenuItem("Python")); + startBox.setAlignment(Pos.TOP_CENTER); + startBox.setTranslateX(360); + startBox.setTranslateY(300); + + + getMenuItem(0).setActive(true); + + root.getChildren().addAll(background_node, startBox/); + return root; + } private Node createLeftContent() { final Text inbox = new Text( playerNum+ " are playing this game");