Refactor drawable profile score to match web

This commit is contained in:
Bartłomiej Dach
2020-02-16 06:16:02 +01:00
parent 01f9966933
commit e5a66bdef3
3 changed files with 86 additions and 39 deletions

View File

@ -28,7 +28,30 @@ namespace osu.Game.Tests.Visual.Online
public TestSceneUserProfileScores()
{
var score = new ScoreInfo
var firstScore = new ScoreInfo
{
PP = 1047.21,
Rank = ScoreRank.SH,
Beatmap = new BeatmapInfo
{
Metadata = new BeatmapMetadata
{
Title = "JUSTadICE (TV Size)",
Artist = "Oomori Seiko"
},
Version = "Extreme"
},
Date = DateTimeOffset.Now,
Mods = new Mod[]
{
new OsuModHidden(),
new OsuModHardRock(),
new OsuModDoubleTime()
},
Accuracy = 0.9813
};
var secondScore = new ScoreInfo
{
PP = 134.32,
Rank = ScoreRank.A,
@ -50,7 +73,7 @@ namespace osu.Game.Tests.Visual.Online
Accuracy = 0.998546
};
var secondScore = new ScoreInfo
var thirdScore = new ScoreInfo
{
PP = 96.83,
Rank = ScoreRank.S,
@ -93,10 +116,12 @@ namespace osu.Game.Tests.Visual.Online
Spacing = new Vector2(0, 10),
Children = new[]
{
new ColourProvidedContainer(OverlayColourScheme.Green, new DrawableProfileScore(score)),
new ColourProvidedContainer(OverlayColourScheme.Green, new DrawableProfileScore(firstScore)),
new ColourProvidedContainer(OverlayColourScheme.Green, new DrawableProfileScore(secondScore)),
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileScore(noPPScore)),
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileWeightedScore(score, 0.85)),
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileWeightedScore(secondScore, 0.66)),
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileWeightedScore(firstScore, 0.97)),
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileWeightedScore(secondScore, 0.85)),
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileWeightedScore(thirdScore, 0.66)),
}
});
}