diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2023-05-17 08:54:49 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2023-05-17 08:54:49 -0400 |
commit | 39a01b860b1d348088202d89ac3e3fa10410f9ed (patch) | |
tree | 03fc163e8da075c1f4e0869edd094c216da52449 /src/gui | |
parent | 7f68620c10c2c5ea62195bd06e7344042e486419 (diff) | |
download | NPEhero-39a01b860b1d348088202d89ac3e3fa10410f9ed.tar.gz NPEhero-39a01b860b1d348088202d89ac3e3fa10410f9ed.tar.bz2 NPEhero-39a01b860b1d348088202d89ac3e3fa10410f9ed.zip |
add LevelSurround
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/LevelSurround.java | 55 |
1 files changed, 39 insertions, 16 deletions
diff --git a/src/gui/LevelSurround.java b/src/gui/LevelSurround.java index 22fcf97..bf71f2f 100644 --- a/src/gui/LevelSurround.java +++ b/src/gui/LevelSurround.java @@ -39,33 +39,56 @@ public class LevelSurround extends Pane diff.setText("Easy"); diff.setFill(Color.WHITE); - VBox textBox = new VBox(); - textBox.setAlignment(Pos.TOP_RIGHT); - textBox.getChildren().addAll(title,diff); + VBox titleTextBox = new VBox(); + titleTextBox.setAlignment(Pos.TOP_RIGHT); + titleTextBox.getChildren().addAll(title,diff); BorderPane topBar = new BorderPane(); topBar.setLeft(buttonBox); - topBar.setRight(textBox); + topBar.setRight(titleTextBox); topBar.setPadding(new Insets(10)); - Text title = new Text(); - title.setText("Test level 1"); - title.setFill(Color.WHITE); - title.setFont(new Font(50)); - Text diff = new Text(); - diff.setText("Easy"); - diff.setFill(Color.WHITE); + Text scoreLabel = new Text(); + scoreLabel.setText("Score:"); + scoreLabel.setFill(Color.WHITE); + + Text score = new Text(); + score.setText("100000"); + score.setFill(Color.WHITE); + score.setFont(new Font(50)); + + VBox scoreTextBox = new VBox(); + scoreTextBox.setAlignment(Pos.BOTTOM_LEFT); + scoreTextBox.getChildren().addAll(scoreLabel,score); + scoreTextBox.setPadding(new Insets(10)); + + + Text comboLabel = new Text(); + comboLabel.setText("Combo:"); + comboLabel.setFill(Color.WHITE); + + Text combo = new Text(); + combo.setText("100000"); + combo.setFill(Color.WHITE); + combo.setFont(new Font(50)); + + VBox comboTextBox = new VBox(); + comboTextBox.setAlignment(Pos.BOTTOM_RIGHT); + comboTextBox.getChildren().addAll(comboLabel,combo); + comboTextBox.setPadding(new Insets(10)); - VBox textBox = new VBox(); - textBox.setAlignment(Pos.TOP_RIGHT); - textBox.getChildren().addAll(title,diff); + Pane game = new Pane(); + game.minWidthProperty().bind(super.heightProperty().multiply(0.66)); + game.minHeightProperty().bind(super.heightProperty()); + game.getStyleClass().add("textBox"); HBox centerBox = new HBox(); - centerBox.getStyleClass().add("textBox"); + centerBox.getChildren().addAll(comboTextBox,game, scoreTextBox); + centerBox.setAlignment(Pos.BOTTOM_CENTER); StackPane root = new StackPane(); - root.getChildren().addAll(topBar,centerBox); + root.getChildren().addAll(centerBox, topBar); super.getChildren().add(root); root.minWidthProperty().bind(super.minWidthProperty()); |