mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
Flip if
s to reduce nesting
This commit is contained in:
parent
9a3c947319
commit
f22828bc50
@ -213,30 +213,8 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
|
||||
private Drawable createDrawablePerformance()
|
||||
{
|
||||
if (!Score.PP.HasValue)
|
||||
if (Score.PP.HasValue)
|
||||
{
|
||||
if (Score.Beatmap?.Status.GrantsPerformancePoints() == true)
|
||||
{
|
||||
if (!Score.Ranked)
|
||||
{
|
||||
return new UnrankedPerformancePointsPlaceholder
|
||||
{
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Colour = colourProvider.Highlight1
|
||||
};
|
||||
}
|
||||
|
||||
return new UnprocessedPerformancePointsPlaceholder { Size = new Vector2(16), Colour = colourProvider.Highlight1 };
|
||||
}
|
||||
|
||||
return new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Text = "-",
|
||||
Colour = colourProvider.Highlight1
|
||||
};
|
||||
}
|
||||
|
||||
return new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
@ -263,6 +241,28 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
};
|
||||
}
|
||||
|
||||
if (Score.Beatmap?.Status.GrantsPerformancePoints() != true)
|
||||
{
|
||||
return new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Text = "-",
|
||||
Colour = colourProvider.Highlight1
|
||||
};
|
||||
}
|
||||
|
||||
if (!Score.Ranked)
|
||||
{
|
||||
return new UnrankedPerformancePointsPlaceholder
|
||||
{
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Colour = colourProvider.Highlight1
|
||||
};
|
||||
}
|
||||
|
||||
return new UnprocessedPerformancePointsPlaceholder { Size = new Vector2(16), Colour = colourProvider.Highlight1 };
|
||||
}
|
||||
|
||||
private partial class ScoreBeatmapMetadataContainer : BeatmapMetadataContainer
|
||||
{
|
||||
public ScoreBeatmapMetadataContainer(IBeatmapInfo beatmapInfo)
|
||||
|
Loading…
Reference in New Issue
Block a user