mirror of https://github.com/ppy/osu
Move Length to BeatmapOnlineInfo.
This commit is contained in:
parent
43fa314fe0
commit
4be8899fb2
|
@ -46,7 +46,6 @@ private void load(RulesetStore rulesets)
|
|||
FavouriteCount = 356,
|
||||
Submitted = new DateTime(2016, 2, 10),
|
||||
Ranked = new DateTime(2016, 6, 19),
|
||||
Length = 118000,
|
||||
BPM = 236,
|
||||
Author = new User
|
||||
{
|
||||
|
@ -75,6 +74,7 @@ private void load(RulesetStore rulesets)
|
|||
},
|
||||
OnlineInfo = new BeatmapOnlineInfo
|
||||
{
|
||||
Length = 115000,
|
||||
HasVideo = false,
|
||||
CircleCount = 265,
|
||||
SliderCount = 71,
|
||||
|
@ -103,6 +103,7 @@ private void load(RulesetStore rulesets)
|
|||
},
|
||||
OnlineInfo = new BeatmapOnlineInfo
|
||||
{
|
||||
Length = 118000,
|
||||
HasVideo = false,
|
||||
CircleCount = 592,
|
||||
SliderCount = 62,
|
||||
|
@ -131,6 +132,7 @@ private void load(RulesetStore rulesets)
|
|||
},
|
||||
OnlineInfo = new BeatmapOnlineInfo
|
||||
{
|
||||
Length = 118000,
|
||||
HasVideo = false,
|
||||
CircleCount = 1042,
|
||||
SliderCount = 79,
|
||||
|
@ -159,6 +161,7 @@ private void load(RulesetStore rulesets)
|
|||
},
|
||||
OnlineInfo = new BeatmapOnlineInfo
|
||||
{
|
||||
Length = 118000,
|
||||
HasVideo = false,
|
||||
CircleCount = 1352,
|
||||
SliderCount = 69,
|
||||
|
@ -187,6 +190,7 @@ private void load(RulesetStore rulesets)
|
|||
},
|
||||
OnlineInfo = new BeatmapOnlineInfo
|
||||
{
|
||||
Length = 118000,
|
||||
HasVideo = false,
|
||||
CircleCount = 1730,
|
||||
SliderCount = 115,
|
||||
|
|
|
@ -10,6 +10,11 @@ namespace osu.Game.Beatmaps
|
|||
/// </summary>
|
||||
public class BeatmapOnlineInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The length in milliseconds of this beatmap's song.
|
||||
/// </summary>
|
||||
public double Length { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not this beatmap has a background video.
|
||||
/// </summary>
|
||||
|
|
|
@ -44,11 +44,6 @@ public class BeatmapSetOnlineInfo
|
|||
[JsonProperty(@"previewUrl")]
|
||||
public string Preview { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The length in milliseconds of this beatmap's song.
|
||||
/// </summary>
|
||||
public double Length { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The beats per minute of this beatmap set's song.
|
||||
/// </summary>
|
||||
|
|
|
@ -25,6 +25,8 @@ public BeatmapInfo Beatmap
|
|||
{
|
||||
if (value == beatmap) return;
|
||||
beatmap = value;
|
||||
|
||||
length.Value = TimeSpan.FromMilliseconds(beatmap.OnlineInfo.Length).ToString(@"m\:ss");
|
||||
circleCount.Value = string.Format(@"{0:n0}", beatmap.OnlineInfo.CircleCount);
|
||||
sliderCount.Value = string.Format(@"{0:n0}", beatmap.OnlineInfo.SliderCount);
|
||||
}
|
||||
|
@ -40,11 +42,7 @@ public BasicStats(BeatmapSetInfo set)
|
|||
Direction = FillDirection.Horizontal,
|
||||
Children = new[]
|
||||
{
|
||||
length = new Statistic(FontAwesome.fa_clock_o, "Length")
|
||||
{
|
||||
Width = statWidth,
|
||||
Value = TimeSpan.FromMilliseconds(set.OnlineInfo.Length).ToString(@"m\:ss"),
|
||||
},
|
||||
length = new Statistic(FontAwesome.fa_clock_o, "Length") { Width = statWidth },
|
||||
bpm = new Statistic(FontAwesome.fa_circle, "BPM")
|
||||
{
|
||||
Width = statWidth,
|
||||
|
|
Loading…
Reference in New Issue