fixed timeline in medley mode
This commit is contained in:
1 parent
4172f85bc8
commit
a86ca33d9b
2 files changed
+26
-12
No files matched your search
@@ -274,6 +274,7 @@ namespace Vocaluxe.Lib.Song
|
|||||||
private int _StartBeat;
|
private int _StartBeat;
|
||||||
private int _EndBeat;
|
private int _EndBeat;
|
||||||
private bool _PerfectLine; // for drawing perfect line effect
|
private bool _PerfectLine; // for drawing perfect line effect
|
||||||
|
private bool _VisibleInTimeLine;
|
||||||
|
|
||||||
private int _MinBeat = int.MaxValue;
|
private int _MinBeat = int.MaxValue;
|
||||||
private int _MaxBeat = int.MinValue;
|
private int _MaxBeat = int.MinValue;
|
||||||
@@ -285,6 +286,7 @@ namespace Vocaluxe.Lib.Song
|
|||||||
StartBeat = int.MinValue;
|
StartBeat = int.MinValue;
|
||||||
EndBeat = int.MaxValue;
|
EndBeat = int.MaxValue;
|
||||||
_PerfectLine = false;
|
_PerfectLine = false;
|
||||||
|
_VisibleInTimeLine = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CLine(CLine line)
|
public CLine(CLine line)
|
||||||
@@ -298,10 +300,17 @@ namespace Vocaluxe.Lib.Song
|
|||||||
_PerfectLine = line._PerfectLine;
|
_PerfectLine = line._PerfectLine;
|
||||||
_MinBeat = line._MinBeat;
|
_MinBeat = line._MinBeat;
|
||||||
_MaxBeat = line._MaxBeat;
|
_MaxBeat = line._MaxBeat;
|
||||||
|
_VisibleInTimeLine = line._VisibleInTimeLine;
|
||||||
}
|
}
|
||||||
#endregion Constructors
|
#endregion Constructors
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
public bool VisibleInTimeLine
|
||||||
|
{
|
||||||
|
get { return _VisibleInTimeLine; }
|
||||||
|
set { _VisibleInTimeLine = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public int StartBeat
|
public int StartBeat
|
||||||
{
|
{
|
||||||
get { return _StartBeat; }
|
get { return _StartBeat; }
|
||||||
@@ -508,6 +517,8 @@ namespace Vocaluxe.Lib.Song
|
|||||||
if (note.StartBeat < StartBeat || note.EndBeat > EndBeat)
|
if (note.StartBeat < StartBeat || note.EndBeat > EndBeat)
|
||||||
note.NoteType = ENoteType.Freestyle;
|
note.NoteType = ENoteType.Freestyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_VisibleInTimeLine = _MinBeat >= StartBeat && _MaxBeat <= EndBeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMinMaxBeat(CNote Note)
|
private void updateMinMaxBeat(CNote Note)
|
||||||
|
|||||||
@@ -1087,19 +1087,22 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
CLine[] Line = Lines[i].Line;
|
CLine[] Line = Lines[i].Line;
|
||||||
for(int j = 0; j<Line.Length; j++){
|
for(int j = 0; j<Line.Length; j++){
|
||||||
TimeRect trect = new TimeRect();
|
if (Line[j].VisibleInTimeLine)
|
||||||
trect.startBeat = Line[j].FirstNoteBeat;
|
{
|
||||||
trect.endBeat = Line[j].EndBeat;
|
TimeRect trect = new TimeRect();
|
||||||
|
trect.startBeat = Line[j].FirstNoteBeat;
|
||||||
trect.rect = new CStatic(new STexture(-1),
|
trect.endBeat = Line[j].EndBeat;
|
||||||
new SColorF(1f, 1f, 1f, 1f),
|
|
||||||
new SRectF(stat.Rect.X + stat.Rect.W * ((CGame.GetTimeFromBeats(trect.startBeat, song.BPM) + song.Gap - song.Start) / TotalTime),
|
|
||||||
stat.Rect.Y,
|
|
||||||
stat.Rect.W * (CGame.GetTimeFromBeats((trect.endBeat - trect.startBeat), song.BPM) / TotalTime),
|
|
||||||
stat.Rect.H,
|
|
||||||
stat.Rect.Z));
|
|
||||||
|
|
||||||
_TimeRects.Add(trect);
|
trect.rect = new CStatic(new STexture(-1),
|
||||||
|
new SColorF(1f, 1f, 1f, 1f),
|
||||||
|
new SRectF(stat.Rect.X + stat.Rect.W * ((CGame.GetTimeFromBeats(trect.startBeat, song.BPM) + song.Gap - song.Start) / TotalTime),
|
||||||
|
stat.Rect.Y,
|
||||||
|
stat.Rect.W * (CGame.GetTimeFromBeats((trect.endBeat - trect.startBeat), song.BPM) / TotalTime),
|
||||||
|
stat.Rect.H,
|
||||||
|
stat.Rect.Z));
|
||||||
|
|
||||||
|
_TimeRects.Add(trect);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user