Options for handing unknown beatmap source

This commit is contained in:
Michael Manis
2019-02-10 18:31:39 -05:00
parent e33277bd76
commit cfe14dcdb1

View File

@ -181,9 +181,12 @@ namespace osu.Game.Screens.Select
ratingsContainer.FadeIn(transition_duration); ratingsContainer.FadeIn(transition_duration);
advanced.Beatmap = Beatmap; advanced.Beatmap = Beatmap;
description.Text = Beatmap.Version; description.Text = Beatmap.Version;
//source.Text = string.IsNullOrEmpty(Beatmap.Metadata.Source) ? "Unknown source" : Beatmap.Metadata.Source;
source.Text = Beatmap.Metadata.Source; source.Text = Beatmap.Metadata.Source;
tags.Text = Beatmap.Metadata.Tags; tags.Text = Beatmap.Metadata.Tags;
tags.Margin = new MarginPadding { Top = string.IsNullOrEmpty(Beatmap.Metadata.Source) ? -2 * spacing : 0 };
var requestedBeatmap = Beatmap; var requestedBeatmap = Beatmap;
if (requestedBeatmap.Metrics == null) if (requestedBeatmap.Metrics == null)
{ {
@ -331,6 +334,11 @@ namespace osu.Game.Screens.Select
}; };
} }
public MarginPadding Margin
{
set => textContainer.Margin = value;
}
public string Text public string Text
{ {
set set
@ -340,7 +348,6 @@ namespace osu.Game.Screens.Select
textContainer.FadeOut(transition_duration); textContainer.FadeOut(transition_duration);
return; return;
} }
setTextAsync(value); setTextAsync(value);
} }
} }