Use readonly IBindable

This commit is contained in:
Endrik Tombak 2020-04-12 19:42:28 +03:00
parent ed28e8c8f5
commit 3b9e0fa67d
2 changed files with 5 additions and 4 deletions

View File

@ -274,12 +274,13 @@ namespace osu.Game.Overlays.BeatmapSet
{
case DownloadState.LocallyAvailable:
// temporary for UX until new design is implemented.
downloadButtonsContainer.Child = new PanelDownloadButton(BeatmapSet.Value)
PanelDownloadButton panelButton;
downloadButtonsContainer.Child = panelButton = new PanelDownloadButton(BeatmapSet.Value)
{
Width = 50,
RelativeSizeAxes = Axes.Y,
CurrentBeatmap = Picker.Beatmap.GetBoundCopy()
RelativeSizeAxes = Axes.Y
};
panelButton.CurrentBeatmap.BindTo(Picker.Beatmap);
break;
case DownloadState.Downloading:

View File

@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Direct
private readonly bool noVideo;
public Bindable<BeatmapInfo> CurrentBeatmap = new Bindable<BeatmapInfo>();
public readonly IBindable<BeatmapInfo> CurrentBeatmap = new Bindable<BeatmapInfo>();
private readonly ShakeContainer shakeContainer;
private readonly DownloadButton button;