diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2023-05-21 17:12:06 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2023-05-21 17:12:06 -0400 |
commit | f941b529f1cb12312041516e6799ece0f6df2cac (patch) | |
tree | fc905d0dc1f67380c55c7053e22a76c1917821e9 /src/gui/DebugMenu.java | |
parent | f49a73c6af7445bb4ae92fcab87e13abba527048 (diff) | |
download | NPEhero-f941b529f1cb12312041516e6799ece0f6df2cac.tar.gz NPEhero-f941b529f1cb12312041516e6799ece0f6df2cac.tar.bz2 NPEhero-f941b529f1cb12312041516e6799ece0f6df2cac.zip |
add f11 fullscrn, comment gui, add scorecontroller
Diffstat (limited to '')
-rw-r--r-- | src/gui/DebugMenu.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/gui/DebugMenu.java b/src/gui/DebugMenu.java index c014ee0..79545e9 100644 --- a/src/gui/DebugMenu.java +++ b/src/gui/DebugMenu.java @@ -9,6 +9,13 @@ import main.Level; public class DebugMenu { public Stage primaryStage = new Stage(); + + /* + * this class is a layout class, most of its purpose is to place UI elements like Buttons within Panes like VBoxes. + * the creation of these UI elements are mostly not commented due to their repetitive and self explanatory nature. + * style classes are defined in the style.css file. + */ + VBox primaryPane = new VBox(); public DebugMenu() { Button wallpaperTest = new Button(); @@ -25,17 +32,26 @@ public class DebugMenu Button testfinish = new Button(); testfinish.setText("launch game end"); + //create a sample level for testing Level temp = new Level(); temp.title = "Title"; temp.aritst = "artist"; - testfinish.setOnAction(e -> Driver.setMenu(new GameOver(300, new Settings(), temp, "Easy"))); + testfinish.setOnAction(e -> Driver.setMenu(new GameOver(temp, "Easy", new Settings(), 300))); - VBox primaryPane = new VBox(); primaryPane.getChildren().addAll(wallpaperTest,wallpaperTest2,wallpaperTest3,testfinish); Scene primaryScene = new Scene(primaryPane); primaryStage.setScene(primaryScene); primaryStage.setTitle("debug"); + } + + public void show() + { primaryStage.show(); } + + public void addButton(Button b) + { + primaryPane.getChildren().add(b); + } } |