mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 15:33:05 +08:00
Rename ordering helper method
This commit is contained in:
parent
267465df18
commit
c6521e4c72
@ -286,14 +286,11 @@ namespace osu.Game.Rulesets.Scoring
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ordered index of a <see cref="HitResult"/>. Used for sorting.
|
||||
/// Ordered index of a <see cref="HitResult"/>. Used for consistent order when displaying hit results to the user.
|
||||
/// </summary>
|
||||
/// <param name="result">The <see cref="HitResult"/> to get the index of.</param>
|
||||
/// <returns>The index of <paramref name="result"/>.</returns>
|
||||
public static int OrderingIndex(this HitResult result)
|
||||
{
|
||||
return order.IndexOf(result);
|
||||
}
|
||||
public static int GetIndexForOrderedDisplay(this HitResult result) => order.IndexOf(result);
|
||||
}
|
||||
#pragma warning restore CS0618
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
|
||||
public Bar(IDictionary<HitResult, int> values, float maxValue, bool isCentre)
|
||||
{
|
||||
this.values = values.OrderBy(v => v.Key.OrderingIndex()).ToList();
|
||||
this.values = values.OrderBy(v => v.Key.GetIndexForOrderedDisplay()).ToList();
|
||||
this.maxValue = maxValue;
|
||||
this.isCentre = isCentre;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user