mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 16:27:43 +08:00
93 lines
3.2 KiB
C#
93 lines
3.2 KiB
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Game.Online.API.Requests.Responses;
|
|
using osu.Game.Online.Leaderboards;
|
|
using osu.Game.Rulesets.Mania;
|
|
using osu.Game.Rulesets.Mods;
|
|
using osu.Game.Rulesets.Osu;
|
|
using osu.Game.Rulesets.Osu.Mods;
|
|
using osu.Game.Scoring;
|
|
using osu.Game.Users;
|
|
using osuTK;
|
|
|
|
namespace osu.Game.Tests.Visual.SongSelect
|
|
{
|
|
public partial class TestSceneLeaderboardScoreV2 : OsuTestScene
|
|
{
|
|
[BackgroundDependencyLoader]
|
|
private void load()
|
|
{
|
|
var scores = new[]
|
|
{
|
|
new ScoreInfo
|
|
{
|
|
Position = 999,
|
|
Rank = ScoreRank.XH,
|
|
Accuracy = 1,
|
|
MaxCombo = 244,
|
|
TotalScore = 1707827,
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), new OsuModAlternate(), new OsuModFlashlight(), new OsuModFreezeFrame() },
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
|
User = new APIUser
|
|
{
|
|
Id = 6602580,
|
|
Username = @"waaiiru",
|
|
CountryCode = CountryCode.ES,
|
|
},
|
|
},
|
|
new ScoreInfo
|
|
{
|
|
Position = 22333,
|
|
Rank = ScoreRank.S,
|
|
Accuracy = 0.1f,
|
|
MaxCombo = 32040,
|
|
Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), new OsuModAlternate(), new OsuModFlashlight(), new OsuModFreezeFrame(), new OsuModClassic() },
|
|
TotalScore = 1707827,
|
|
Ruleset = new OsuRuleset().RulesetInfo,
|
|
User = new APIUser
|
|
{
|
|
Id = 1541390,
|
|
Username = @"Toukai",
|
|
CountryCode = CountryCode.CA,
|
|
},
|
|
},
|
|
|
|
new ScoreInfo
|
|
{
|
|
Position = 110000,
|
|
Rank = ScoreRank.X,
|
|
Accuracy = 1,
|
|
MaxCombo = 244,
|
|
TotalScore = 17078279,
|
|
Ruleset = new ManiaRuleset().RulesetInfo,
|
|
User = new APIUser
|
|
{
|
|
Id = 4608074,
|
|
Username = @"Skycries",
|
|
CountryCode = CountryCode.BR,
|
|
},
|
|
},
|
|
};
|
|
|
|
Child = new FillFlowContainer
|
|
{
|
|
Width = 900,
|
|
Anchor = Anchor.Centre,
|
|
Origin = Anchor.Centre,
|
|
Spacing = new Vector2(0, 10),
|
|
AutoSizeAxes = Axes.Y,
|
|
Children = new Drawable[]
|
|
{
|
|
new LeaderboardScoreV2(scores[0], 1),
|
|
new LeaderboardScoreV2(scores[1], null, true),
|
|
new LeaderboardScoreV2(scores[2], null, true)
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|