1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 14:12:54 +08:00

Add comments and tidy up

This commit is contained in:
Henry Lin 2022-01-18 21:59:51 +08:00
parent 43e5bd731c
commit a5b53c01c8
2 changed files with 10 additions and 4 deletions

View File

@ -140,8 +140,14 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
public class PerformanceBreakdown public class PerformanceBreakdown
{ {
/// <summary>
/// Actual gameplay performance.
/// </summary>
public PerformanceAttributes Performance { get; set; } public PerformanceAttributes Performance { get; set; }
/// <summary>
/// Performance of a perfect play for comparison.
/// </summary>
public PerformanceAttributes PerfectPerformance { get; set; } public PerformanceAttributes PerfectPerformance { get; set; }
} }
} }

View File

@ -23,7 +23,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
public class PerformanceStatisticTooltip : VisibilityContainer, ITooltip<PerformanceBreakdown> public class PerformanceStatisticTooltip : VisibilityContainer, ITooltip<PerformanceBreakdown>
{ {
private readonly Box background; private readonly Box background;
private Colour4 totalColour; private Colour4 titleColor;
private Colour4 textColour; private Colour4 textColour;
protected override Container<Drawable> Content { get; } protected override Container<Drawable> Content { get; }
@ -53,7 +53,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
private void load(OsuColour colours) private void load(OsuColour colours)
{ {
background.Colour = colours.Gray3; background.Colour = colours.Gray3;
totalColour = colours.Blue; titleColor = colours.Blue;
textColour = colours.BlueLighter; textColour = colours.BlueLighter;
} }
@ -107,7 +107,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Font = OsuFont.GetFont(weight: FontWeight.Regular), Font = OsuFont.GetFont(weight: FontWeight.Regular),
Text = attribute.DisplayName, Text = attribute.DisplayName,
Colour = isTotal ? totalColour : textColour Colour = isTotal ? titleColor : textColour
}, },
new Bar new Bar
{ {
@ -126,7 +126,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Font = OsuFont.GetFont(weight: FontWeight.SemiBold), Font = OsuFont.GetFont(weight: FontWeight.SemiBold),
Text = fraction.ToLocalisableString("0%"), Text = fraction.ToLocalisableString("0%"),
Colour = isTotal ? totalColour : textColour Colour = isTotal ? titleColor : textColour
} }
} }
} }