mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
Rename notch const to spacing
This commit is contained in:
parent
397def9ceb
commit
4e5c9ddbfe
@ -76,9 +76,9 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
public const double VIRTUAL_SS_PERCENTAGE = 0.01;
|
public const double VIRTUAL_SS_PERCENTAGE = 0.01;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The width of a solid "notch" in terms of accuracy that appears at the ends of the rank circles to add separation.
|
/// The width of spacing in terms of accuracy between the grade circles.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const double NOTCH_WIDTH_PERCENTAGE = 2.0 / 360;
|
public const double GRADE_SPACING_PERCENTAGE = 2.0 / 360;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The easing for the circle filling transforms.
|
/// The easing for the circle filling transforms.
|
||||||
@ -241,10 +241,10 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
// to prevent ambiguity on what grade it's pointing at.
|
// to prevent ambiguity on what grade it's pointing at.
|
||||||
foreach (double p in notchPercentages)
|
foreach (double p in notchPercentages)
|
||||||
{
|
{
|
||||||
if (Precision.AlmostEquals(p, targetAccuracy, NOTCH_WIDTH_PERCENTAGE / 2))
|
if (Precision.AlmostEquals(p, targetAccuracy, GRADE_SPACING_PERCENTAGE / 2))
|
||||||
{
|
{
|
||||||
int tippingDirection = targetAccuracy - p >= 0 ? 1 : -1; // We "round up" here to match rank criteria
|
int tippingDirection = targetAccuracy - p >= 0 ? 1 : -1; // We "round up" here to match rank criteria
|
||||||
targetAccuracy = p + tippingDirection * (NOTCH_WIDTH_PERCENTAGE / 2);
|
targetAccuracy = p + tippingDirection * (GRADE_SPACING_PERCENTAGE / 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -253,7 +253,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
if (score.Rank == ScoreRank.X || score.Rank == ScoreRank.XH)
|
if (score.Rank == ScoreRank.X || score.Rank == ScoreRank.XH)
|
||||||
targetAccuracy = 1;
|
targetAccuracy = 1;
|
||||||
else
|
else
|
||||||
targetAccuracy = Math.Min(accuracyX - VIRTUAL_SS_PERCENTAGE - NOTCH_WIDTH_PERCENTAGE / 2, targetAccuracy);
|
targetAccuracy = Math.Min(accuracyX - VIRTUAL_SS_PERCENTAGE - GRADE_SPACING_PERCENTAGE / 2, targetAccuracy);
|
||||||
|
|
||||||
// The accuracy circle gauge visually fills up a bit too much.
|
// The accuracy circle gauge visually fills up a bit too much.
|
||||||
// This wouldn't normally matter but we want it to align properly with the inner graded circle in the above cases.
|
// This wouldn't normally matter but we want it to align properly with the inner graded circle in the above cases.
|
||||||
@ -349,7 +349,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
.FadeOut(800, Easing.Out);
|
.FadeOut(800, Easing.Out);
|
||||||
|
|
||||||
accuracyCircle
|
accuracyCircle
|
||||||
.FillTo(accuracyS - NOTCH_WIDTH_PERCENTAGE / 2 - visual_alignment_offset, 70, Easing.OutQuint);
|
.FillTo(accuracyS - GRADE_SPACING_PERCENTAGE / 2 - visual_alignment_offset, 70, Easing.OutQuint);
|
||||||
|
|
||||||
badges.Single(b => b.Rank == getRank(ScoreRank.S))
|
badges.Single(b => b.Rank == getRank(ScoreRank.S))
|
||||||
.FadeOut(70, Easing.OutQuint);
|
.FadeOut(70, Easing.OutQuint);
|
||||||
|
@ -79,8 +79,8 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
|
|
||||||
public GradedCircle(double startProgress, double endProgress)
|
public GradedCircle(double startProgress, double endProgress)
|
||||||
{
|
{
|
||||||
this.startProgress = startProgress + AccuracyCircle.NOTCH_WIDTH_PERCENTAGE * 0.5;
|
this.startProgress = startProgress + AccuracyCircle.GRADE_SPACING_PERCENTAGE * 0.5;
|
||||||
this.endProgress = endProgress - AccuracyCircle.NOTCH_WIDTH_PERCENTAGE * 0.5;
|
this.endProgress = endProgress - AccuracyCircle.GRADE_SPACING_PERCENTAGE * 0.5;
|
||||||
|
|
||||||
Anchor = Anchor.Centre;
|
Anchor = Anchor.Centre;
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
Loading…
Reference in New Issue
Block a user