aboutsummaryrefslogtreecommitdiff
path: root/src/devmenu/NotesEditor.java
blob: 400d547cc3a1312e8d72227003e920a0fac906b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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()
    {

    }
}