Update UpdateableBeatmapBackgroundSprite to accept IBeatmapInfo

This commit is contained in:
Dean Herbert
2021-10-27 15:20:01 +09:00
parent 45db99171e
commit f268363924
2 changed files with 17 additions and 11 deletions

View File

@ -333,13 +333,14 @@ namespace osu.Game.Screens.OnlinePlay
public PanelBackground()
{
UpdateableBeatmapBackgroundSprite backgroundSprite;
InternalChildren = new Drawable[]
{
new UpdateableBeatmapBackgroundSprite
backgroundSprite = new UpdateableBeatmapBackgroundSprite
{
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fill,
Beatmap = { BindTarget = Beatmap }
},
new FillFlowContainer
{
@ -374,6 +375,10 @@ namespace osu.Game.Screens.OnlinePlay
}
}
};
// manual binding required as playlists don't expose IBeatmapInfo currently.
// may be removed in the future if this changes.
Beatmap.BindValueChanged(beatmap => backgroundSprite.Beatmap.Value = beatmap.NewValue);
}
}
}