Flip method to read better

This commit is contained in:
Salman Ahmed 2022-07-25 10:03:06 +03:00
parent 6bdd1f43a2
commit 4d90e6bbac

View File

@ -219,42 +219,42 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
private Drawable createDrawablePerformance() private Drawable createDrawablePerformance()
{ {
if (Score.PP.HasValue) if (!Score.PP.HasValue)
{ {
return new FillFlowContainer if (Score.Beatmap?.Status.GrantsPerformancePoints() == true)
return new UnprocessedPerformancePointsPlaceholder { Size = new Vector2(16), Colour = colourProvider.Highlight1 };
return new OsuSpriteText
{ {
AutoSizeAxes = Axes.Both, Font = OsuFont.GetFont(weight: FontWeight.Bold),
Direction = FillDirection.Horizontal, Text = "-",
Children = new[] Colour = colourProvider.Highlight1
{
new OsuSpriteText
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Font = OsuFont.GetFont(weight: FontWeight.Bold),
Text = $"{Score.PP:0}",
Colour = colourProvider.Highlight1
},
new OsuSpriteText
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
Text = "pp",
Colour = colourProvider.Light3
}
}
}; };
} }
if (Score.Beatmap?.Status.GrantsPerformancePoints() == true) return new FillFlowContainer
return new UnprocessedPerformancePointsPlaceholder { Size = new Vector2(16), Colour = colourProvider.Highlight1 };
return new OsuSpriteText
{ {
Font = OsuFont.GetFont(weight: FontWeight.Bold), AutoSizeAxes = Axes.Both,
Text = "-", Direction = FillDirection.Horizontal,
Colour = colourProvider.Highlight1 Children = new[]
{
new OsuSpriteText
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Font = OsuFont.GetFont(weight: FontWeight.Bold),
Text = $"{Score.PP:0}",
Colour = colourProvider.Highlight1
},
new OsuSpriteText
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
Text = "pp",
Colour = colourProvider.Light3
}
}
}; };
} }