Setup basic draw line for a multiple note and marking multi hold notes.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 3 years ago
parent fe59befb19
commit bf50ebc2e1
  1. 3
      LLSIG/src/main/java/LLSIG/Canvas.java
  2. 1
      LLSIG/src/main/java/LLSIG/LLSIG.java
  3. 10
      LLSIG/src/main/java/LLSIG/Lane.java
  4. 2
      LLSIG/src/main/java/LLSIG/Note.java

@ -201,6 +201,9 @@ public class Canvas extends JPanel implements AudioSpectrumListener{
public void drawNote(Graphics g,double x,double y,double xsize,double ysize,boolean multiple) {
g.fillOval((int)x,(int)y,(int)(xsize*NOTE_SIZE),(int)(ysize*NOTE_SIZE));
if (multiple) {
g.fillRoundRect((int)x,(int)(y+(ysize*NOTE_SIZE)/2),(int)(xsize*NOTE_SIZE), 4, 6, 2);
}
}
@Override
public void spectrumDataUpdate(double timestamp, double duration, float[] magnitudes, float[] phases) {

@ -37,6 +37,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{
public static double offset = 0;
public static double testOffset = 0;
public static double beatDelay = ((1/((double)bpm/60))*1000);
public static boolean lastHold = false; //A toggle. Decides primary/secondary color marking.
public static List<Long> beats = new ArrayList<Long>();

@ -69,27 +69,37 @@ public class Lane{
if (l!=this) {
for (Note nn : l.noteChart) {
if (nn.start==n.start) {
if (!n.multiple&&!nn.multiple) {LLSIG.lastHold=!LLSIG.lastHold;}
nn.multiple=true;
n.multiple=true;
n.multiple_col=nn.multiple_col=LLSIG.lastHold;
}
if (n.getNoteType()==NoteType.HOLD) {
if (nn.getNoteType()==NoteType.HOLD) {
if (n.start==nn.end) {
if (!n.multiple&&!nn.multiple2) {LLSIG.lastHold=!LLSIG.lastHold;}
nn.multiple2=true;
n.multiple=true;
n.multiple_col=nn.multiple2_col=LLSIG.lastHold;
}
if (n.end==nn.start) {
if (!n.multiple2&&!nn.multiple) {LLSIG.lastHold=!LLSIG.lastHold;}
nn.multiple=true;
n.multiple2=true;
n.multiple2_col=nn.multiple_col=LLSIG.lastHold;
} else
if (n.end==nn.end) {
if (!n.multiple2&&!nn.multiple2) {LLSIG.lastHold=!LLSIG.lastHold;}
nn.multiple2=true;
n.multiple2=true;
n.multiple2_col=nn.multiple2_col=LLSIG.lastHold;
}
} else {
if (n.end==nn.start) {
if (!n.multiple2&&!nn.multiple) {LLSIG.lastHold=!LLSIG.lastHold;}
nn.multiple=true;
n.multiple2=true;
n.multiple2_col=nn.multiple_col=LLSIG.lastHold;
}
}
}

@ -9,6 +9,8 @@ public class Note {
boolean deleted=false; //Set this marker to delete it on the next frame (when using the editor)
boolean multiple=false; //Whether or not to display an indicator showing this is a multi-press note.
boolean multiple2=false; //Whether or not to display an indicator showing this is a multi-press note for the ending of the hold.
boolean multiple_col=false; //If true, use the secondary color.
boolean multiple2_col=false; //If true, use the secondary color.
public Note(NoteType type,double start,double end) {
this.type=type;
this.start=start;

Loading…
Cancel
Save