mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Add Rank as a property to the Score Processor
This commit is contained in:
@ -147,7 +147,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay
|
||||
public void BindProcessor(ScoreProcessor processor)
|
||||
{
|
||||
info.AccuracyDisplay.Current.BindTo(processor.Accuracy);
|
||||
info.GradeDisplay.Current.BindTo(processor.Accuracy);
|
||||
info.GradeDisplay.Current.BindTo(processor.Rank);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Play.BreaksOverlay
|
||||
{
|
||||
@ -12,7 +13,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay
|
||||
{
|
||||
public PercentageInfoLine AccuracyDisplay;
|
||||
public InfoLine<int> RankDisplay;
|
||||
public GradeInfoLine GradeDisplay;
|
||||
public InfoLine<ScoreRank> GradeDisplay;
|
||||
|
||||
public InfoContainer()
|
||||
{
|
||||
@ -40,7 +41,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay
|
||||
{
|
||||
AccuracyDisplay = new PercentageInfoLine("Accuracy"),
|
||||
RankDisplay = new InfoLine<int>("Rank", @"#"),
|
||||
GradeDisplay = new GradeInfoLine("Grade"),
|
||||
GradeDisplay = new InfoLine<ScoreRank>("Grade"),
|
||||
},
|
||||
}
|
||||
};
|
||||
|
@ -7,7 +7,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Play.BreaksOverlay
|
||||
{
|
||||
@ -80,13 +79,4 @@ namespace osu.Game.Screens.Play.BreaksOverlay
|
||||
|
||||
protected override string Format(double count) => $@"{count:P2}";
|
||||
}
|
||||
|
||||
public class GradeInfoLine : InfoLine<double>
|
||||
{
|
||||
public GradeInfoLine(string name, string prefix = "") : base(name, prefix)
|
||||
{
|
||||
}
|
||||
|
||||
protected override string Format(double count) => $@"{ScoreProcessor.RankFrom(count)}";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user