aboutsummaryrefslogtreecommitdiff
path: root/src/devmenu/NotesEditor.java
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/devmenu/NotesEditor.java
parent99584f39f8e8f3b69255135665040c2a947d4021 (diff)
downloadNPEhero-6c216a309838bf1cbeb19070ce180c0170ccd3c9.tar.gz
NPEhero-6c216a309838bf1cbeb19070ce180c0170ccd3c9.tar.bz2
NPEhero-6c216a309838bf1cbeb19070ce180c0170ccd3c9.zip
early code for level editor gui
Diffstat (limited to 'src/devmenu/NotesEditor.java')
-rw-r--r--src/devmenu/NotesEditor.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/devmenu/NotesEditor.java b/src/devmenu/NotesEditor.java
new file mode 100644
index 0000000..5f26890
--- /dev/null
+++ b/src/devmenu/NotesEditor.java
@@ -0,0 +1,50 @@
+package devmenu;
+
+import java.io.File;
+
+import gameplay.Timer;
+import javafx.scene.Scene;
+import javafx.scene.control.Button;
+import javafx.scene.layout.HBox;
+import javafx.scene.text.Text;
+import javafx.stage.Stage;
+import main.Difficulty;
+import sound.AudioFilePlayer;
+
+public class NotesEditor
+{
+ Difficulty diff;
+ AudioFilePlayer music;
+ Timer timer;
+ public NotesEditor(Difficulty diff)
+ {
+ this.diff = diff;
+
+ Text timerDisplay = new Text("TIMER");
+
+ Button start = new Button("Start");
+ start.setOnAction(e -> start());
+
+ Button stop = new Button("Stop");
+ stop.setOnAction(e -> stop());
+
+ HBox main = new HBox();
+ main.getChildren().addAll(timerDisplay,start,stop);
+
+ Scene scene = new Scene(main);
+ Stage primaryStage = new Stage();
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+
+ private void start()
+ {
+ music = new AudioFilePlayer(new File(diff.thisDir, "song.wav").toPath().toString());
+ timer = new Timer(diff.bpm);
+ }
+
+ private void stop()
+ {
+
+ }
+} \ No newline at end of file