aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/sowgro/npehero/editor/NotesEditor2.java
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2024-07-29 00:30:28 -0400
committersowgro <tpoke.ferrari@gmail.com>2024-07-29 00:30:28 -0400
commitf3a037701799169066c6cb12b3c7023029b8b281 (patch)
tree6e9bb0839152dc52faab8d3a927d077b864a85de /src/main/java/net/sowgro/npehero/editor/NotesEditor2.java
parent0ce09f72f4af26412356b9699d402b52dbcfc94f (diff)
downloadNPEhero-f3a037701799169066c6cb12b3c7023029b8b281.tar.gz
NPEhero-f3a037701799169066c6cb12b3c7023029b8b281.tar.bz2
NPEhero-f3a037701799169066c6cb12b3c7023029b8b281.zip
Show level and difficulty loading errors in the gui
Diffstat (limited to 'src/main/java/net/sowgro/npehero/editor/NotesEditor2.java')
-rw-r--r--src/main/java/net/sowgro/npehero/editor/NotesEditor2.java15
1 files changed, 15 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 b6810d8..e3db0b1 100644
--- a/src/main/java/net/sowgro/npehero/editor/NotesEditor2.java
+++ b/src/main/java/net/sowgro/npehero/editor/NotesEditor2.java
@@ -173,6 +173,12 @@ public class NotesEditor2 extends Page {
throw new RuntimeException(e);
}
diff.endTime = newEndTime.get();
+ diff.bpm = 0.0;
+ try {
+ diff.readMetadata();
+ } catch (IOException e) {
+ // TODO
+ }
Sound.playSfx(Sound.BACKWARD);
Driver.setMenu(new DiffEditor(diff, prev.prev));
});
@@ -333,6 +339,15 @@ public class NotesEditor2 extends Page {
newEndTime.set(tmp);
}
});
+
+ activeNotes.addListener((_, _, _) -> {
+ if (activeNotes.isEmpty()) {
+ selectionLabel.setText("Selection");
+ }
+ else {
+ selectionLabel.setText("Selection (" + activeNotes.size() + ")");
+ }
+ });
}
@Override