1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 02:42:54 +08:00

Do not show star difficulty on wedge if zero

This commit is contained in:
Bartłomiej Dach 2020-08-31 11:05:42 +02:00
parent 4736845318
commit 7d273d631b

View File

@ -223,14 +223,13 @@ namespace osu.Game.Screens.Select
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
Padding = new MarginPadding { Top = 14, Right = shear_width / 2 }, Padding = new MarginPadding { Top = 14, Right = shear_width / 2 },
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Children = new Drawable[] Children = new[]
{ {
new StarRatingDisplay(beatmapInfo) createStarRatingDisplay(beatmapInfo).With(display =>
{ {
Anchor = Anchor.CentreRight, display.Anchor = Anchor.CentreRight;
Origin = Anchor.CentreRight, display.Origin = Anchor.CentreRight;
Margin = new MarginPadding { Bottom = 5 } }),
},
StatusPill = new BeatmapSetOnlineStatusPill StatusPill = new BeatmapSetOnlineStatusPill
{ {
Anchor = Anchor.CentreRight, Anchor = Anchor.CentreRight,
@ -291,6 +290,13 @@ namespace osu.Game.Screens.Select
StatusPill.Hide(); StatusPill.Hide();
} }
private static Drawable createStarRatingDisplay(BeatmapInfo beatmapInfo) => beatmapInfo.StarDifficulty > 0
? new StarRatingDisplay(beatmapInfo)
{
Margin = new MarginPadding { Bottom = 5 }
}
: Empty();
private void setMetadata(string source) private void setMetadata(string source)
{ {
ArtistLabel.Text = artistBinding.Value; ArtistLabel.Text = artistBinding.Value;