Skip to content
Snippets Groups Projects
Commit f06bed5d authored by dlw-9ak-u1's avatar dlw-9ak-u1
Browse files

Update MainMenu.java

parent d0f7b9d8
No related branches found
No related tags found
No related merge requests found
......@@ -100,6 +100,37 @@ public class MainMenu extends Application {
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");
inbox.setFill(Color.WHITE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment