1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 15:27:20 +08:00

Remove RankNotch

This commit is contained in:
Andrei Zavatski 2024-01-29 05:05:18 +03:00
parent 5d456c8d68
commit 32b0e0b738
2 changed files with 14 additions and 68 deletions

View File

@ -76,9 +76,9 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
private const double virtual_ss_percentage = 0.01;
/// <summary>
/// The width of a <see cref="RankNotch"/> in terms of accuracy.
/// The width of a solid "notch" in terms of accuracy that appears at the ends of the rank circles to add separation.
/// </summary>
public const double NOTCH_WIDTH_PERCENTAGE = 1.0 / 360;
public const float NOTCH_WIDTH_PERCENTAGE = 2f / 360;
/// <summary>
/// The easing for the circle filling transforms.
@ -174,7 +174,8 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.ForRank(ScoreRank.D),
InnerRadius = RANK_CIRCLE_RADIUS,
Current = { Value = accuracyC }
Current = { Value = accuracyC - NOTCH_WIDTH_PERCENTAGE },
Rotation = NOTCH_WIDTH_PERCENTAGE * 0.5f * 360
},
new CircularProgress
{
@ -183,8 +184,8 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.ForRank(ScoreRank.C),
InnerRadius = RANK_CIRCLE_RADIUS,
Current = { Value = accuracyB - accuracyC },
Rotation = (float)accuracyC * 360
Current = { Value = accuracyB - accuracyC - NOTCH_WIDTH_PERCENTAGE },
Rotation = (float)accuracyC * 360 + NOTCH_WIDTH_PERCENTAGE * 0.5f * 360
},
new CircularProgress
{
@ -193,8 +194,8 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.ForRank(ScoreRank.B),
InnerRadius = RANK_CIRCLE_RADIUS,
Current = { Value = accuracyA - accuracyB },
Rotation = (float)accuracyB * 360
Current = { Value = accuracyA - accuracyB - NOTCH_WIDTH_PERCENTAGE },
Rotation = (float)accuracyB * 360 + NOTCH_WIDTH_PERCENTAGE * 0.5f * 360
},
new CircularProgress
{
@ -203,8 +204,8 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.ForRank(ScoreRank.A),
InnerRadius = RANK_CIRCLE_RADIUS,
Current = { Value = accuracyS - accuracyA },
Rotation = (float)accuracyA * 360
Current = { Value = accuracyS - accuracyA - NOTCH_WIDTH_PERCENTAGE },
Rotation = (float)accuracyA * 360 + NOTCH_WIDTH_PERCENTAGE * 0.5f * 360
},
new CircularProgress
{
@ -213,8 +214,8 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.ForRank(ScoreRank.S),
InnerRadius = RANK_CIRCLE_RADIUS,
Current = { Value = accuracyX - accuracyS - virtual_ss_percentage },
Rotation = (float)accuracyS * 360
Current = { Value = accuracyX - accuracyS - virtual_ss_percentage - NOTCH_WIDTH_PERCENTAGE },
Rotation = (float)accuracyS * 360 + NOTCH_WIDTH_PERCENTAGE * 0.5f * 360
},
new CircularProgress
{
@ -223,15 +224,9 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.ForRank(ScoreRank.X),
InnerRadius = RANK_CIRCLE_RADIUS,
Current = { Value = 1f - (accuracyX - virtual_ss_percentage) },
Rotation = (float)(accuracyX - virtual_ss_percentage) * 360
Current = { Value = 1f - (accuracyX - virtual_ss_percentage) - NOTCH_WIDTH_PERCENTAGE },
Rotation = (float)(accuracyX - virtual_ss_percentage) * 360 + NOTCH_WIDTH_PERCENTAGE * 0.5f * 360
},
new RankNotch((float)accuracyX),
new RankNotch((float)(accuracyX - virtual_ss_percentage)),
new RankNotch((float)accuracyS),
new RankNotch((float)accuracyA),
new RankNotch((float)accuracyB),
new RankNotch((float)accuracyC),
new BufferedContainer
{
Name = "Graded circle mask",

View File

@ -1,49 +0,0 @@
// 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.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osuTK;
namespace osu.Game.Screens.Ranking.Expanded.Accuracy
{
/// <summary>
/// A solid "notch" of the <see cref="AccuracyCircle"/> that appears at the ends of the rank circles to add separation.
/// </summary>
public partial class RankNotch : CompositeDrawable
{
private readonly float position;
public RankNotch(float position)
{
this.position = position;
RelativeSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load()
{
InternalChild = new Container
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Rotation = position * 360f,
Child = new Box
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.Y,
Height = AccuracyCircle.RANK_CIRCLE_RADIUS,
Width = (float)AccuracyCircle.NOTCH_WIDTH_PERCENTAGE * 360f,
Colour = OsuColour.Gray(0.3f),
EdgeSmoothness = new Vector2(1f)
}
};
}
}
}