From 4e5c9ddbfe6afad4713e9705cf4b28cd32cfd764 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sun, 4 Feb 2024 03:02:39 +0300 Subject: [PATCH] Rename notch const to spacing --- .../Ranking/Expanded/Accuracy/AccuracyCircle.cs | 12 ++++++------ .../Ranking/Expanded/Accuracy/GradedCircles.cs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/osu.Game/Screens/Ranking/Expanded/Accuracy/AccuracyCircle.cs b/osu.Game/Screens/Ranking/Expanded/Accuracy/AccuracyCircle.cs index 8dc1a48f40..7edfc00760 100644 --- a/osu.Game/Screens/Ranking/Expanded/Accuracy/AccuracyCircle.cs +++ b/osu.Game/Screens/Ranking/Expanded/Accuracy/AccuracyCircle.cs @@ -76,9 +76,9 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy public const double VIRTUAL_SS_PERCENTAGE = 0.01; /// - /// 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. /// - public const double NOTCH_WIDTH_PERCENTAGE = 2.0 / 360; + public const double GRADE_SPACING_PERCENTAGE = 2.0 / 360; /// /// 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. 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 - targetAccuracy = p + tippingDirection * (NOTCH_WIDTH_PERCENTAGE / 2); + targetAccuracy = p + tippingDirection * (GRADE_SPACING_PERCENTAGE / 2); break; } } @@ -253,7 +253,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy if (score.Rank == ScoreRank.X || score.Rank == ScoreRank.XH) targetAccuracy = 1; 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. // 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); 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)) .FadeOut(70, Easing.OutQuint); diff --git a/osu.Game/Screens/Ranking/Expanded/Accuracy/GradedCircles.cs b/osu.Game/Screens/Ranking/Expanded/Accuracy/GradedCircles.cs index e60a24a310..57b6d8e4ac 100644 --- a/osu.Game/Screens/Ranking/Expanded/Accuracy/GradedCircles.cs +++ b/osu.Game/Screens/Ranking/Expanded/Accuracy/GradedCircles.cs @@ -79,8 +79,8 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy public GradedCircle(double startProgress, double endProgress) { - this.startProgress = startProgress + AccuracyCircle.NOTCH_WIDTH_PERCENTAGE * 0.5; - this.endProgress = endProgress - AccuracyCircle.NOTCH_WIDTH_PERCENTAGE * 0.5; + this.startProgress = startProgress + AccuracyCircle.GRADE_SPACING_PERCENTAGE * 0.5; + this.endProgress = endProgress - AccuracyCircle.GRADE_SPACING_PERCENTAGE * 0.5; Anchor = Anchor.Centre; Origin = Anchor.Centre;