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