mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 17:47:18 +08:00
Move layout specification outside the GradedCircles class
This commit is contained in:
parent
7b2adc857a
commit
397def9ceb
@ -1,7 +1,6 @@
|
||||
// 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.Containers;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
@ -25,12 +24,11 @@ namespace osu.Game.Tests.Visual.Ranking
|
||||
double accuracyB = scoreProcessor.AccuracyCutoffFromRank(ScoreRank.B);
|
||||
double accuracyC = scoreProcessor.AccuracyCutoffFromRank(ScoreRank.C);
|
||||
|
||||
Add(new Container
|
||||
Add(ring = new GradedCircles(accuracyC, accuracyB, accuracyA, accuracyS, accuracyX)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(400),
|
||||
Child = ring = new GradedCircles(accuracyC, accuracyB, accuracyA, accuracyS, accuracyX)
|
||||
Size = new Vector2(400)
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@ using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
||||
@ -156,7 +157,18 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
||||
Colour = ColourInfo.GradientVertical(Color4Extensions.FromHex("#7CF6FF"), Color4Extensions.FromHex("#BAFFA9")),
|
||||
InnerRadius = accuracy_circle_radius,
|
||||
},
|
||||
gradedCircles = new GradedCircles(accuracyC, accuracyB, accuracyA, accuracyS, accuracyX),
|
||||
new Container
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Size = new Vector2(0.8f),
|
||||
Padding = new MarginPadding(2.5f),
|
||||
Child = gradedCircles = new GradedCircles(accuracyC, accuracyB, accuracyA, accuracyS, accuracyX)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
}
|
||||
},
|
||||
badges = new Container<RankBadge>
|
||||
{
|
||||
Name = "Rank badges",
|
||||
|
@ -7,7 +7,6 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Scoring;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
||||
{
|
||||
@ -39,11 +38,6 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
||||
|
||||
public GradedCircles(double accuracyC, double accuracyB, double accuracyA, double accuracyS, double accuracyX)
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Size = new Vector2(0.8f);
|
||||
Padding = new MarginPadding(2.5f);
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
dProgress = new GradedCircle(0.0, accuracyC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user