Multiple hold note markers for deleting and hold notes

main
Joshua Sigona 3 years ago
parent 21c16a0520
commit c8bb8c01f6
  1. 13
      LLSIG/src/main/java/LLSIG/LLSIG.java
  2. 1
      LLSIG/src/main/java/LLSIG/Lane.java

@ -471,6 +471,11 @@ public class LLSIG implements KeyListener,MouseWheelListener{
List<Note> map = noteBeatMap.getOrDefault(n.beatSnapStart, new ArrayList<Note>()); List<Note> map = noteBeatMap.getOrDefault(n.beatSnapStart, new ArrayList<Note>());
map.add(n); map.add(n);
noteBeatMap.putIfAbsent(n.beatSnapStart, map); noteBeatMap.putIfAbsent(n.beatSnapStart, map);
if (n.getNoteType()==NoteType.HOLD) {
map = noteBeatMap.getOrDefault(n.beatSnapEnd, new ArrayList<Note>());
map.add(n);
noteBeatMap.putIfAbsent(n.beatSnapEnd, map);
}
} }
} }
for (Double d : noteBeatMap.keySet()) { for (Double d : noteBeatMap.keySet()) {
@ -487,6 +492,10 @@ public class LLSIG implements KeyListener,MouseWheelListener{
} }
} }
lastHold=!lastHold; lastHold=!lastHold;
} else {
for (Note n : notes) {
n.multiple=n.multiple2=false;
}
} }
} }
} }
@ -549,6 +558,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{
lastNote.active2=false; lastNote.active2=false;
clap.setFramePosition(0); clap.setFramePosition(0);
clap.start(); clap.start();
updateMultipleNoteMarkers();
} }
} }
LLSIG.game.lanes.get(lane).keyPressed=false; LLSIG.game.lanes.get(lane).keyPressed=false;
@ -564,6 +574,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{
lastNote.setBeatSnapEnd(noteBeat); lastNote.setBeatSnapEnd(noteBeat);
lastNote.active2=false; lastNote.active2=false;
//LLSIG.game.lanes.get(lane).lastNoteAdded=null; //LLSIG.game.lanes.get(lane).lastNoteAdded=null;
updateMultipleNoteMarkers();
} }
} }
LLSIG.game.lanes.get(lane).keyPressed=false; LLSIG.game.lanes.get(lane).keyPressed=false;
@ -589,7 +600,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{
public void mouseWheelMoved(MouseWheelEvent e) { public void mouseWheelMoved(MouseWheelEvent e) {
if (EDITOR) { if (EDITOR) {
if (e.getWheelRotation()!=0) { if (e.getWheelRotation()!=0) {
if (Math.abs(e.getWheelRotation())<0) { if (e.getWheelRotation()<0) {
//Rotated up. //Rotated up.
EDITOR_CURSOR_BEAT=Math.max(EDITOR_CURSOR_BEAT-(1d/EDITOR_BEAT_DIVISIONS),0); EDITOR_CURSOR_BEAT=Math.max(EDITOR_CURSOR_BEAT-(1d/EDITOR_BEAT_DIVISIONS),0);
} else { } else {

@ -23,6 +23,7 @@ public class Lane{
public void clearOutDeletedNotes() { public void clearOutDeletedNotes() {
if (noteChart.removeIf(note->note.deleted)) { if (noteChart.removeIf(note->note.deleted)) {
System.out.println("Deleted note from "+this); System.out.println("Deleted note from "+this);
LLSIG.updateMultipleNoteMarkers();
} }
} }
public boolean noteExists() { public boolean noteExists() {

Loading…
Cancel
Save