1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-06 08:52:55 +08:00

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: case DownloadState.LocallyAvailable:
// temporary for UX until new design is implemented. // 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, Width = 50,
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y
CurrentBeatmap = Picker.Beatmap.GetBoundCopy()
}; };
panelButton.CurrentBeatmap.BindTo(Picker.Beatmap);
break; break;
case DownloadState.Downloading: case DownloadState.Downloading:

View File

@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Direct
private readonly bool noVideo; 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 ShakeContainer shakeContainer;
private readonly DownloadButton button; private readonly DownloadButton button;