Setup basic draw line for a multiple note and marking multi hold notes.
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
fe59befb19
commit
bf50ebc2e1
@ -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) {
|
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));
|
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
|
@Override
|
||||||
public void spectrumDataUpdate(double timestamp, double duration, float[] magnitudes, float[] phases) {
|
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 offset = 0;
|
||||||
public static double testOffset = 0;
|
public static double testOffset = 0;
|
||||||
public static double beatDelay = ((1/((double)bpm/60))*1000);
|
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>();
|
public static List<Long> beats = new ArrayList<Long>();
|
||||||
|
|
||||||
|
@ -69,27 +69,37 @@ public class Lane{
|
|||||||
if (l!=this) {
|
if (l!=this) {
|
||||||
for (Note nn : l.noteChart) {
|
for (Note nn : l.noteChart) {
|
||||||
if (nn.start==n.start) {
|
if (nn.start==n.start) {
|
||||||
|
if (!n.multiple&&!nn.multiple) {LLSIG.lastHold=!LLSIG.lastHold;}
|
||||||
nn.multiple=true;
|
nn.multiple=true;
|
||||||
n.multiple=true;
|
n.multiple=true;
|
||||||
|
n.multiple_col=nn.multiple_col=LLSIG.lastHold;
|
||||||
}
|
}
|
||||||
if (n.getNoteType()==NoteType.HOLD) {
|
if (n.getNoteType()==NoteType.HOLD) {
|
||||||
if (nn.getNoteType()==NoteType.HOLD) {
|
if (nn.getNoteType()==NoteType.HOLD) {
|
||||||
if (n.start==nn.end) {
|
if (n.start==nn.end) {
|
||||||
|
if (!n.multiple&&!nn.multiple2) {LLSIG.lastHold=!LLSIG.lastHold;}
|
||||||
nn.multiple2=true;
|
nn.multiple2=true;
|
||||||
n.multiple=true;
|
n.multiple=true;
|
||||||
|
n.multiple_col=nn.multiple2_col=LLSIG.lastHold;
|
||||||
}
|
}
|
||||||
if (n.end==nn.start) {
|
if (n.end==nn.start) {
|
||||||
|
if (!n.multiple2&&!nn.multiple) {LLSIG.lastHold=!LLSIG.lastHold;}
|
||||||
nn.multiple=true;
|
nn.multiple=true;
|
||||||
n.multiple2=true;
|
n.multiple2=true;
|
||||||
|
n.multiple2_col=nn.multiple_col=LLSIG.lastHold;
|
||||||
} else
|
} else
|
||||||
if (n.end==nn.end) {
|
if (n.end==nn.end) {
|
||||||
|
if (!n.multiple2&&!nn.multiple2) {LLSIG.lastHold=!LLSIG.lastHold;}
|
||||||
nn.multiple2=true;
|
nn.multiple2=true;
|
||||||
n.multiple2=true;
|
n.multiple2=true;
|
||||||
|
n.multiple2_col=nn.multiple2_col=LLSIG.lastHold;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (n.end==nn.start) {
|
if (n.end==nn.start) {
|
||||||
|
if (!n.multiple2&&!nn.multiple) {LLSIG.lastHold=!LLSIG.lastHold;}
|
||||||
nn.multiple=true;
|
nn.multiple=true;
|
||||||
n.multiple2=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 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 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 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) {
|
public Note(NoteType type,double start,double end) {
|
||||||
this.type=type;
|
this.type=type;
|
||||||
this.start=start;
|
this.start=start;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user