Present selected difficulty

This commit is contained in:
Endrik Tombak
2020-04-12 16:00:05 +03:00
parent 2393ce5f51
commit ecd25e567d
3 changed files with 19 additions and 6 deletions

View File

@ -1,7 +1,9 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Graphics.Containers;
@ -16,6 +18,8 @@ namespace osu.Game.Overlays.Direct
private readonly bool noVideo;
public Bindable<BeatmapInfo> CurrentBeatmap = new Bindable<BeatmapInfo>();
private readonly ShakeContainer shakeContainer;
private readonly DownloadButton button;
@ -62,7 +66,11 @@ namespace osu.Game.Overlays.Direct
break;
case DownloadState.LocallyAvailable:
game?.PresentBeatmap(BeatmapSet.Value);
Predicate<BeatmapInfo> findPredicate = null;
if (CurrentBeatmap.Value != null)
findPredicate = b => b.OnlineBeatmapID == CurrentBeatmap.Value.OnlineBeatmapID;
game?.PresentBeatmap(BeatmapSet.Value, findPredicate);
break;
default: