1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Add second beatmap set to test, fix some visual issues.

This commit is contained in:
DrabWeb 2017-09-12 20:55:17 -03:00
parent 169bfe134b
commit a291bd3020
7 changed files with 206 additions and 23 deletions

View File

@ -1,4 +1,7 @@
using System;
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
@ -24,18 +27,17 @@ namespace osu.Desktop.VisualTests.Tests
[BackgroundDependencyLoader]
private void load(RulesetStore rulesets)
{
var r = rulesets.GetRuleset(3);
var mania = rulesets.GetRuleset(3);
var taiko = rulesets.GetRuleset(1);
AddStep(@"show lachryma", () =>
AddStep(@"show first", () =>
{
overlay.ShowBeatmapSet(new BeatmapSetInfo
{
OnlineBeatmapSetID = 415886,
Metadata = new BeatmapMetadata
{
Title = @"Lachryma <Re:QueenM>",
Artist = @"Kaneko Chiharu",
Author = @"Fresh Chicken",
Source = @"SOUND VOLTEX III GRAVITY WARS",
Tags = @"sdvx grace the 5th kac original song contest konami bemani",
},
@ -61,10 +63,9 @@ namespace osu.Desktop.VisualTests.Tests
{
new BeatmapInfo
{
OnlineBeatmapID = 901048,
StarDifficulty = 1.36,
Version = @"BASIC",
Ruleset = r,
Ruleset = mania,
Difficulty = new BeatmapDifficulty
{
CircleSize = 4,
@ -90,10 +91,9 @@ namespace osu.Desktop.VisualTests.Tests
},
new BeatmapInfo
{
OnlineBeatmapID = 901051,
StarDifficulty = 2.22,
Version = @"NOVICE",
Ruleset = r,
Ruleset = mania,
Difficulty = new BeatmapDifficulty
{
CircleSize = 4,
@ -119,10 +119,9 @@ namespace osu.Desktop.VisualTests.Tests
},
new BeatmapInfo
{
OnlineBeatmapID = 901047,
StarDifficulty = 3.49,
Version = @"ADVANCED",
Ruleset = r,
Ruleset = mania,
Difficulty = new BeatmapDifficulty
{
CircleSize = 4,
@ -148,10 +147,9 @@ namespace osu.Desktop.VisualTests.Tests
},
new BeatmapInfo
{
OnlineBeatmapID = 901049,
StarDifficulty = 4.24,
Version = @"EXHAUST",
Ruleset = r,
Ruleset = mania,
Difficulty = new BeatmapDifficulty
{
CircleSize = 4,
@ -177,10 +175,9 @@ namespace osu.Desktop.VisualTests.Tests
},
new BeatmapInfo
{
OnlineBeatmapID = 901050,
StarDifficulty = 5.26,
Version = @"GRAVITY",
Ruleset = r,
Ruleset = mania,
Difficulty = new BeatmapDifficulty
{
CircleSize = 4,
@ -207,6 +204,180 @@ namespace osu.Desktop.VisualTests.Tests
},
});
});
AddStep(@"show second", () =>
{
overlay.ShowBeatmapSet(new BeatmapSetInfo
{
Metadata = new BeatmapMetadata
{
Title = @"Soumatou Labyrinth",
Artist = @"Yunomi with Momobako&miko",
Tags = @"mmbk.com yuzu__rinrin charlotte",
},
OnlineInfo = new BeatmapSetOnlineInfo
{
Preview = @"https://b.ppy.sh/preview/625493.mp3",
PlayCount = 22996,
FavouriteCount = 58,
Submitted = new DateTime(2016, 6, 11),
Ranked = new DateTime(2016, 7, 12),
BPM = 160,
Author = new User
{
Username = @"komasy",
Id = 1980256,
},
Covers = new BeatmapSetOnlineCovers
{
Cover = @"https://assets.ppy.sh/beatmaps/625493/covers/cover.jpg?1499167472",
},
},
Beatmaps = new List<BeatmapInfo>
{
new BeatmapInfo
{
StarDifficulty = 1.40,
Version = @"yzrin's Kantan",
Ruleset = taiko,
Difficulty = new BeatmapDifficulty
{
CircleSize = 2,
DrainRate = 7,
OverallDifficulty = 3,
ApproachRate = 10,
},
OnlineInfo = new BeatmapOnlineInfo
{
Length = 193000,
HasVideo = false,
CircleCount = 262,
SliderCount = 0,
PlayCount = 3952,
PassCount = 1373,
},
Metrics = new BeatmapMetrics
{
Ratings = Enumerable.Range(0, 10),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
},
},
new BeatmapInfo
{
StarDifficulty = 2.23,
Version = @"Futsuu",
Ruleset = taiko,
Difficulty = new BeatmapDifficulty
{
CircleSize = 2,
DrainRate = 6,
OverallDifficulty = 4,
ApproachRate = 10,
},
OnlineInfo = new BeatmapOnlineInfo
{
Length = 193000,
HasVideo = false,
CircleCount = 464,
SliderCount = 0,
PlayCount = 4833,
PassCount = 920,
},
Metrics = new BeatmapMetrics
{
Ratings = Enumerable.Range(0, 10),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
},
},
new BeatmapInfo
{
StarDifficulty = 3.19,
Version = @"Muzukashii",
Ruleset = taiko,
Difficulty = new BeatmapDifficulty
{
CircleSize = 2,
DrainRate = 6,
OverallDifficulty = 5,
ApproachRate = 10,
},
OnlineInfo = new BeatmapOnlineInfo
{
Length = 193000,
HasVideo = false,
CircleCount = 712,
SliderCount = 0,
PlayCount = 4405,
PassCount = 854,
},
Metrics = new BeatmapMetrics
{
Ratings = Enumerable.Range(0, 10),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
},
},
new BeatmapInfo
{
StarDifficulty = 3.97,
Version = @"Charlotte's Oni",
Ruleset = taiko,
Difficulty = new BeatmapDifficulty
{
CircleSize = 5,
DrainRate = 6,
OverallDifficulty = 5.5f,
ApproachRate = 10,
},
OnlineInfo = new BeatmapOnlineInfo
{
Length = 193000,
HasVideo = false,
CircleCount = 943,
SliderCount = 0,
PlayCount = 3950,
PassCount = 693,
},
Metrics = new BeatmapMetrics
{
Ratings = Enumerable.Range(0, 10),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
},
},
new BeatmapInfo
{
StarDifficulty = 5.08,
Version = @"Labyrinth Oni",
Ruleset = taiko,
Difficulty = new BeatmapDifficulty
{
CircleSize = 5,
DrainRate = 5,
OverallDifficulty = 6,
ApproachRate = 10,
},
OnlineInfo = new BeatmapOnlineInfo
{
Length = 193000,
HasVideo = false,
CircleCount = 1068,
SliderCount = 0,
PlayCount = 5856,
PassCount = 1207,
},
Metrics = new BeatmapMetrics
{
Ratings = Enumerable.Range(0, 10),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
},
},
},
});
});
}
}
}

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;

View File

@ -88,8 +88,8 @@ namespace osu.Game.Overlays.OnlineBeatmapSet
Margin = new MarginPadding { Top = 5 },
Children = new[]
{
new Statistic(FontAwesome.fa_play_circle, 682712),
new Statistic(FontAwesome.fa_heart, 357),
new Statistic(FontAwesome.fa_play_circle, set.OnlineInfo.PlayCount),
new Statistic(FontAwesome.fa_heart, set.OnlineInfo.FavouriteCount),
},
},
},

View File

@ -151,11 +151,18 @@ namespace osu.Game.Overlays.OnlineBeatmapSet
},
};
content.AddText(body, t =>
if (!string.IsNullOrEmpty(body))
{
t.TextSize = 14;
t.Colour = textColour;
});
content.AddText(body, t =>
{
t.TextSize = 14;
t.Colour = textColour;
});
}
else
{
Hide();
}
}
[BackgroundDependencyLoader]

View File

@ -110,6 +110,12 @@ namespace osu.Game.Overlays.OnlineBeatmapSet
}
}
protected override void Dispose(bool isDisposing)
{
Playing = false;
base.Dispose(isDisposing);
}
protected override bool OnHover(InputState state)
{
bg.FadeColour(Color4.Black.Opacity(0.5f), 100);

View File

@ -70,6 +70,7 @@ namespace osu.Game.Overlays.OnlineBeatmapSet
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopCentre,
Text = @"0%",
TextSize = 13,
},
},

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;