diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2024-07-08 02:41:31 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2024-07-08 02:41:31 -0400 |
commit | ee2229339429d50afa33e2f8b9c0ee0939766290 (patch) | |
tree | a5ee54bd23c24950e9b10815f3e87605906992d8 /src/main/java/net/sowgro/npehero/devmenu/DebugMenu.java | |
parent | 9e1371424bdf4c31d756d686313730d4c61f7ac5 (diff) | |
download | NPEhero-ee2229339429d50afa33e2f8b9c0ee0939766290.tar.gz NPEhero-ee2229339429d50afa33e2f8b9c0ee0939766290.tar.bz2 NPEhero-ee2229339429d50afa33e2f8b9c0ee0939766290.zip |
Change project structure, embed resources into jar and remove libraries from source control
Diffstat (limited to 'src/main/java/net/sowgro/npehero/devmenu/DebugMenu.java')
-rwxr-xr-x | src/main/java/net/sowgro/npehero/devmenu/DebugMenu.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/main/java/net/sowgro/npehero/devmenu/DebugMenu.java b/src/main/java/net/sowgro/npehero/devmenu/DebugMenu.java new file mode 100755 index 0000000..aecd438 --- /dev/null +++ b/src/main/java/net/sowgro/npehero/devmenu/DebugMenu.java @@ -0,0 +1,41 @@ +package net.sowgro.npehero.devmenu; + +import net.sowgro.npehero.Driver; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.layout.VBox; +import javafx.stage.Stage; + +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 testVol = new Button(); + testVol.setText("print volumes"); + testVol.setOnAction(e -> System.out.println("setc:"+Driver.settingsController.effectsVol+" sndc:"+Driver.soundController.songMediaPlayer.getVolume())); + + primaryPane.getChildren().addAll(testVol); + + 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); + } +} |