Merge remote-tracking branch 'upstream/master' into beatmap-overlay-download

This commit is contained in:
naoey
2017-11-15 17:38:38 +05:30
50 changed files with 635 additions and 1300 deletions

View File

@ -26,6 +26,8 @@ namespace osu.Game.Overlays.BeatmapSet
private readonly Box tabsBg;
private readonly Container coverContainer;
private readonly OsuSpriteText title, artist;
private readonly Container noVideoButtons;
private readonly FillFlowContainer videoButtons;
private readonly AuthorInfo author;
private readonly Container downloadButtonsContainer;
public Details Details;
@ -51,6 +53,9 @@ namespace osu.Game.Overlays.BeatmapSet
title.Text = BeatmapSet.Metadata.Title;
artist.Text = BeatmapSet.Metadata.Artist;
noVideoButtons.FadeTo(BeatmapSet.OnlineInfo.HasVideo ? 0 : 1, transition_duration);
videoButtons.FadeTo(BeatmapSet.OnlineInfo.HasVideo ? 1 : 0, transition_duration);
cover?.FadeOut(400, Easing.Out);
coverContainer.Add(cover = new DelayedLoadWrapper(new BeatmapSetCover(BeatmapSet)
{
@ -82,9 +87,6 @@ namespace osu.Game.Overlays.BeatmapSet
Radius = 3,
Offset = new Vector2(0f, 1f),
};
Container noVideoButtons;
FillFlowContainer videoButtons;
Children = new Drawable[]
{
new Container
@ -216,21 +218,7 @@ namespace osu.Game.Overlays.BeatmapSet
},
};
Picker.Beatmap.ValueChanged += b =>
{
Details.Beatmap = b;
if (b.OnlineInfo.HasVideo)
{
noVideoButtons.FadeOut(transition_duration);
videoButtons.FadeIn(transition_duration);
}
else
{
noVideoButtons.FadeIn(transition_duration);
videoButtons.FadeOut(transition_duration);
}
};
Picker.Beatmap.ValueChanged += b => Details.Beatmap = b;
}
[BackgroundDependencyLoader]