aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2023-06-01 00:53:04 -0400
committersowgro <tpoke.ferrari@gmail.com>2023-06-01 00:53:04 -0400
commit6c216a309838bf1cbeb19070ce180c0170ccd3c9 (patch)
tree461f877b9417621cb0a19b1bbc735c8455a570ba /src/gui
parent99584f39f8e8f3b69255135665040c2a947d4021 (diff)
downloadNPEhero-6c216a309838bf1cbeb19070ce180c0170ccd3c9.tar.gz
NPEhero-6c216a309838bf1cbeb19070ce180c0170ccd3c9.tar.bz2
NPEhero-6c216a309838bf1cbeb19070ce180c0170ccd3c9.zip
early code for level editor gui
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/DebugMenu.java52
-rw-r--r--src/gui/Driver.java2
-rw-r--r--src/gui/LevelDetails.java2
3 files changed, 3 insertions, 53 deletions
diff --git a/src/gui/DebugMenu.java b/src/gui/DebugMenu.java
deleted file mode 100644
index 1ee85c0..0000000
--- a/src/gui/DebugMenu.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package gui;
-
-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 wallpaperTest = new Button();
- wallpaperTest.setText("wallpaper trees");
- wallpaperTest.setOnAction(e -> Driver.setBackground("assets/trees.png"));
-
- Button wallpaperTest2 = new Button();
- wallpaperTest2.setText("wallpaper water");
- wallpaperTest2.setOnAction(e -> Driver.setBackground("assets/water.png"));
-
- Button wallpaperTest3 = new Button();
- wallpaperTest3.setText("wallpaper pico");
- wallpaperTest3.setOnAction(e -> Driver.setBackground("assets/pico.png"));
-
- Button testVol = new Button();
- testVol.setText("print volumes");
- testVol.setOnAction(e -> System.out.println("sfx:"+Driver.settingsController.effectsVol+" msc:"+Driver.settingsController.musicVol));
-
- primaryPane.getChildren().addAll(wallpaperTest,wallpaperTest2,wallpaperTest3,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);
- }
-}
diff --git a/src/gui/Driver.java b/src/gui/Driver.java
index 68a703a..fdfe323 100644
--- a/src/gui/Driver.java
+++ b/src/gui/Driver.java
@@ -25,6 +25,8 @@ import main.LevelController;
import main.SettingsController;
import org.json.simple.parser.ParseException;
+import devmenu.DebugMenu;
+
public class Driver extends Application
{
diff --git a/src/gui/LevelDetails.java b/src/gui/LevelDetails.java
index c9ab72b..a415d74 100644
--- a/src/gui/LevelDetails.java
+++ b/src/gui/LevelDetails.java
@@ -84,7 +84,7 @@ public class LevelDetails extends VBox
FlowPane diffSelector = new FlowPane();
diffSelector.setAlignment(Pos.CENTER);
ToggleGroup diffToggleGroup = new ToggleGroup(); //allows only one to be selected at a time
- for (Difficulty diff : level.diffList) //adds a button for each diff
+ for (Difficulty diff : level.getDiffList()) //adds a button for each diff
{
RadioButton temp = new RadioButton();
temp.getStyleClass().remove("radio-button"); //makes the buttons not look like a radio button and instead a normal button