Merge branch 'develop' of github.com:Vocaluxe/Vocaluxe into PartyNames
Conflicts: VocaluxeLib/Menu/CNameSelection.cs
This commit is contained in:
commit
c5104ee219
523 files changed
+834
-137
No files matched your search
@@ -358,8 +358,10 @@ namespace VocaluxeLib.Menu
|
||||
SRectF normalRect = _Text.Rect;
|
||||
_Text.Height += _Text.Height * p * 0.4f;
|
||||
_Text.X -= (_Text.Rect.W - normalRect.W) / 2f;
|
||||
_Text.Y -= (_Text.Rect.W - normalRect.H) / 2f;
|
||||
_Text.Y -= (_Text.Rect.H - normalRect.H) / 2f;
|
||||
_Text.Z -= 0.1f;
|
||||
_Text.Color = _ColorProcessed;
|
||||
|
||||
|
||||
_Text.Draw();
|
||||
|
||||
@@ -442,6 +444,7 @@ namespace VocaluxeLib.Menu
|
||||
return;
|
||||
|
||||
_Text.X = jumpx;
|
||||
_Text.Color = _ColorProcessed;
|
||||
_SetText(_Line.Notes[jumpNote]);
|
||||
|
||||
int diff = _Line.Notes[jumpNote].EndBeat - _Line.Notes[jumpNote].StartBeat;
|
||||
|
||||
@@ -523,7 +523,7 @@ namespace VocaluxeLib.Menu
|
||||
bool visible = profile.Active == EOffOn.TR_CONFIG_ON;
|
||||
if (visible)
|
||||
{
|
||||
if (_UsedProfiles.Contains(profile.ID) && !profile.UserRole.HasFlag(EUserRole.TR_USERROLE_NORMAL))
|
||||
if (_UsedProfiles.Contains(profile.ID) && profile.UserRole >= EUserRole.TR_USERROLE_NORMAL)
|
||||
visible = false;
|
||||
}
|
||||
if (visible)
|
||||
|
||||
@@ -392,10 +392,10 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_AddFlare(re, n);
|
||||
}
|
||||
|
||||
if (note.Perfect && note.EndBeat < CBase.Game.GetRecordedBeat())
|
||||
if (note.Perfect && !note.PerfectDrawn && note.EndBeat < CBase.Game.GetRecordedBeat())
|
||||
{
|
||||
_AddPerfectNote(rect, n);
|
||||
note.Perfect = false;
|
||||
note.PerfectDrawn = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
private bool _SmallView;
|
||||
|
||||
private float _Length = -1f;
|
||||
|
||||
public CSongMenuTileBoard(int partyModeID)
|
||||
: base(partyModeID) {}
|
||||
|
||||
@@ -132,6 +134,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
for (int i = 0; i < _Tiles.Count; i++)
|
||||
_Tiles[i].Selected = _Locked == i + _Offset;
|
||||
}
|
||||
|
||||
if (_Length < 0 && CBase.Sound.GetLength(_PreviewSongStream) > 0 && CBase.Songs.IsInCategory())
|
||||
UpdateLength(CBase.Songs.GetVisibleSong(_PreviewId));
|
||||
}
|
||||
|
||||
private void _UpdatePreview()
|
||||
@@ -145,6 +150,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_VideoIcon.Visible = false;
|
||||
_MedleyCalcIcon.Visible = false;
|
||||
_MedleyTagIcon.Visible = false;
|
||||
_Length = -1f;
|
||||
|
||||
//Check if nothing is selected (for preview)
|
||||
if (_PreviewId < 0)
|
||||
@@ -173,14 +179,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_MedleyCalcIcon.Visible = song.Medley.Source == EDataSource.Calculated;
|
||||
_MedleyTagIcon.Visible = song.Medley.Source == EDataSource.Tag;
|
||||
|
||||
float time = CBase.Sound.GetLength(_PreviewSongStream);
|
||||
if (Math.Abs(song.Finish) > 0.001)
|
||||
time = song.Finish;
|
||||
|
||||
time -= song.Start;
|
||||
var min = (int)Math.Floor(time / 60f);
|
||||
var sec = (int)(time - min * 60f);
|
||||
_SongLength.Text = min.ToString("00") + ":" + sec.ToString("00");
|
||||
UpdateLength(song);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -197,6 +196,23 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateLength(CSong song)
|
||||
{
|
||||
float time = CBase.Sound.GetLength(_PreviewSongStream);
|
||||
if (Math.Abs(song.Finish) > 0.001)
|
||||
time = song.Finish;
|
||||
|
||||
// The audiobackend is not yet ready to return the length
|
||||
if (time > 0)
|
||||
{
|
||||
time -= song.Start;
|
||||
var min = (int)Math.Floor(time / 60f);
|
||||
var sec = (int)(time - min * 60f);
|
||||
_SongLength.Text = min.ToString("00") + ":" + sec.ToString("00");
|
||||
_Length = time;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && CBase.Songs.GetNumCategories() > 0 && !CBase.Songs.IsInCategory())
|
||||
|
||||
Reference in new issue
Block a user