Merge branch 'master' of git://github.com/ppy/osu into direct-previews

This commit is contained in:
Jorolf
2017-09-26 12:22:11 +02:00
54 changed files with 3977 additions and 100 deletions

View File

@ -38,6 +38,7 @@ namespace osu.Game.Overlays.Direct
private ProgressBar progressBar;
private BeatmapManager beatmaps;
private NotificationOverlay notifications;
private BeatmapSetOverlay beatmapSetOverlay;
public readonly Bindable<bool> PreviewPlaying = new Bindable<bool>();
protected abstract PlayButton PlayButton { get; }
@ -67,11 +68,12 @@ namespace osu.Game.Overlays.Direct
[BackgroundDependencyLoader(permitNulls: true)]
private void load(APIAccess api, BeatmapManager beatmaps, OsuColour colours, NotificationOverlay notifications)
private void load(APIAccess api, BeatmapManager beatmaps, OsuColour colours, NotificationOverlay notifications, BeatmapSetOverlay beatmapSetOverlay)
{
this.api = api;
this.beatmaps = beatmaps;
this.notifications = notifications;
this.beatmapSetOverlay = beatmapSetOverlay;
AddInternal(content = new Container
{
@ -125,6 +127,14 @@ namespace osu.Game.Overlays.Direct
base.OnHoverLost(state);
}
protected override bool OnClick(InputState state)
{
ShowInformation();
return true;
}
protected void ShowInformation() => beatmapSetOverlay?.ShowBeatmapSet(SetInfo);
protected void StartDownload()
{
if (!api.LocalUser.Value.IsSupporter)