Rework preview tracks to reduce usage complexities

This commit is contained in:
smoogipoo
2018-06-21 16:19:07 +09:00
parent ab2889da1f
commit b2066c5d73
10 changed files with 172 additions and 90 deletions

View File

@ -83,7 +83,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
if (Playing.Value && preview != null)
{
// prevent negative (potential infinite) width if a track without length was loaded
progress.Width = preview.Track.Length > 0 ? (float)(preview.Track.CurrentTime / preview.Track.Length) : 0f;
progress.Width = preview.Length > 0 ? (float)(preview.CurrentTime / preview.Length) : 0f;
}
else
progress.Width = 0;