fixed timeline in medley mode
This commit is contained in:
1 parent
4172f85bc8
commit
a86ca33d9b
2 files changed
+14
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,6 +1087,8 @@ 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++){
|
||||||
|
if (Line[j].VisibleInTimeLine)
|
||||||
|
{
|
||||||
TimeRect trect = new TimeRect();
|
TimeRect trect = new TimeRect();
|
||||||
trect.startBeat = Line[j].FirstNoteBeat;
|
trect.startBeat = Line[j].FirstNoteBeat;
|
||||||
trect.endBeat = Line[j].EndBeat;
|
trect.endBeat = Line[j].EndBeat;
|
||||||
@@ -1101,6 +1103,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
_TimeRects.Add(trect);
|
_TimeRects.Add(trect);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in new issue
Block a user