diff --git a/MainMenu.java b/MainMenu.java index 5207989bdd20b87ea9727b0f954a126eea1082bc..50aeff0b52aa3384f53a1ae706faf77ecb51b32e 100644 --- a/MainMenu.java +++ b/MainMenu.java @@ -99,6 +99,37 @@ public class MainMenu extends Application { root.getChildren().addAll(background_node, mainInfoBox, menuBox); return root; } + + 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; + } private Node createLeftContent() { final Text inbox = new Text( playerNum+ " are playing this game");