diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2024-08-29 22:16:21 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2024-08-29 22:16:21 -0400 |
commit | aa916b0f06be0d42bec1e035d0efeec954e09243 (patch) | |
tree | d79d5a463781145cc1dc39362890756c43d6b502 /src/main/java/net/sowgro/npehero/editor/NotesEditor2.java | |
parent | fb70a24c04a5beec6cc7ff9248ef8f5fd46fcc87 (diff) | |
download | NPEhero-aa916b0f06be0d42bec1e035d0efeec954e09243.tar.gz NPEhero-aa916b0f06be0d42bec1e035d0efeec954e09243.tar.bz2 NPEhero-aa916b0f06be0d42bec1e035d0efeec954e09243.zip |
add button click sounds to all buttons
Diffstat (limited to 'src/main/java/net/sowgro/npehero/editor/NotesEditor2.java')
-rw-r--r-- | src/main/java/net/sowgro/npehero/editor/NotesEditor2.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/net/sowgro/npehero/editor/NotesEditor2.java b/src/main/java/net/sowgro/npehero/editor/NotesEditor2.java index e3db0b1..f5b63e2 100644 --- a/src/main/java/net/sowgro/npehero/editor/NotesEditor2.java +++ b/src/main/java/net/sowgro/npehero/editor/NotesEditor2.java @@ -165,6 +165,7 @@ public class NotesEditor2 extends Page { Button save = new Button(); save.setText("Save"); save.setOnAction(_ -> { + Sound.playSfx(Sound.FORWARD); diff.notes.list = noteList; try { diff.notes.writeFile(); @@ -256,6 +257,7 @@ public class NotesEditor2 extends Page { }); play.setOnAction(_ -> { + Sound.playSfx(Sound.FORWARD); if (play.isSelected()) { m.play(); } @@ -266,6 +268,7 @@ public class NotesEditor2 extends Page { }); scrollLock.setOnAction(_ -> { + Sound.playSfx(Sound.FORWARD); if (scrollLock.isSelected()) { // vvalue takes in a value between 0 and 1 NOT a pixel value scroll.vvalueProperty().bind(playhead.layoutYProperty().subtract(scroll.heightProperty().divide(2)).divide(scrollContent.heightProperty().subtract(scroll.heightProperty()))); @@ -278,10 +281,12 @@ public class NotesEditor2 extends Page { }); reset.setOnAction(_ -> { + Sound.playSfx(Sound.FORWARD); m.seek(new Duration(0)); }); delNote.setOnAction(_ -> { + Sound.playSfx(Sound.FORWARD); activeNotes.forEach(e -> { noteList.remove(e.note); }); @@ -289,11 +294,13 @@ public class NotesEditor2 extends Page { }); clearSelect.setOnAction(_ -> { + Sound.playSfx(Sound.FORWARD); activeNotes.forEach(e -> e.setFill(e.color)); activeNotes.clear(); }); selectAll.setOnAction(_ -> { + Sound.playSfx(Sound.FORWARD); activeNotes.clear(); for (Pane lane : lanes) { lane.getChildren().forEach(e -> activeNotes.add((Block) e)); @@ -304,6 +311,7 @@ public class NotesEditor2 extends Page { Pane addHelp = addHelp(); Pane moveHelp = moveHelp(); addNote.setOnAction(_ -> { + Sound.playSfx(Sound.FORWARD); if (addNote.isSelected()) { helpBox.getChildren().clear(); helpBox.getChildren().add(addHelp); @@ -314,6 +322,7 @@ public class NotesEditor2 extends Page { }); moveNote.setOnAction(_ -> { + Sound.playSfx(Sound.FORWARD); if (moveNote.isSelected()) { helpBox.getChildren().clear(); helpBox.getChildren().add(moveHelp); @@ -331,6 +340,7 @@ public class NotesEditor2 extends Page { }); setEnd.setOnAction(_ -> { + Sound.playSfx(Sound.FORWARD); double tmp = screenPosToSecond(playhead.getLayoutY()); if (Math.round(tmp*10)/10 == Math.round(m.getTotalDuration().toSeconds() * 10)/10) { newEndTime.set(0); |