hide unnecessary lines on empty BeatmapInfoWedge

adding back deleted line

ooops
meh
This commit is contained in:
Aergwyn 2017-12-21 20:23:10 +01:00
parent be526d68e8
commit 214154c512
1 changed files with 18 additions and 16 deletions

View File

@ -95,7 +95,7 @@ private void load()
List<InfoLabel> labels = new List<InfoLabel>();
if (beatmap != null)
if (beatmap != null && !(working is DummyWorkingBeatmap))
{
HitObject lastObject = beatmap.HitObjects.LastOrDefault();
double endTime = (lastObject as IHasEndTime)?.EndTime ?? lastObject?.StartTime ?? 0;
@ -200,21 +200,7 @@ private void load()
Margin = new MarginPadding { Top = 10 },
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Children = new[]
{
new OsuSpriteText
{
Font = @"Exo2.0-Medium",
Text = "mapped by ",
TextSize = 15,
},
new OsuSpriteText
{
Font = @"Exo2.0-Bold",
Text = metadata.Author.Username,
TextSize = 15,
},
}
Children = working is DummyWorkingBeatmap ? Array.Empty<Drawable>() : getMapper(metadata)
},
new FillFlowContainer
{
@ -228,6 +214,22 @@ private void load()
};
}
private OsuSpriteText[] getMapper(BeatmapMetadata metadata) => new[]
{
new OsuSpriteText
{
Font = @"Exo2.0-Medium",
Text = "mapped by ",
TextSize = 15,
},
new OsuSpriteText
{
Font = @"Exo2.0-Bold",
Text = metadata.Author.Username,
TextSize = 15,
}
};
private string getBPMRange(Beatmap beatmap)
{
double bpmMax = beatmap.ControlPointInfo.BPMMaximum;