1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 11:57:30 +08:00
osu-lazer/osu.Game.Tests/Visual/Ranking/TestSceneGradedCircles.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.4 KiB
C#
Raw Normal View History

2024-01-29 10:29:29 +08:00
// 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.Graphics;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Screens.Ranking.Expanded.Accuracy;
using osuTK;
namespace osu.Game.Tests.Visual.Ranking
{
public partial class TestSceneGradedCircles : OsuTestScene
{
private readonly GradedCircles ring;
public TestSceneGradedCircles()
{
ScoreProcessor scoreProcessor = new OsuRuleset().CreateScoreProcessor();
double accuracyX = scoreProcessor.AccuracyCutoffFromRank(ScoreRank.X);
double accuracyS = scoreProcessor.AccuracyCutoffFromRank(ScoreRank.S);
double accuracyA = scoreProcessor.AccuracyCutoffFromRank(ScoreRank.A);
double accuracyB = scoreProcessor.AccuracyCutoffFromRank(ScoreRank.B);
double accuracyC = scoreProcessor.AccuracyCutoffFromRank(ScoreRank.C);
Add(ring = new GradedCircles(accuracyC, accuracyB, accuracyA, accuracyS, accuracyX)
2024-01-29 10:29:29 +08:00
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(400)
2024-01-29 10:29:29 +08:00
});
}
protected override void LoadComplete()
{
base.LoadComplete();
AddSliderStep("Progress", 0.0, 1.0, 1.0, p => ring.Progress = p);
}
}
}