2019-02-05 18:00:01 +08:00
|
|
|
// 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 osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Beatmaps.Drawables;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Multi.Components
|
|
|
|
{
|
|
|
|
public class MultiplayerBackgroundSprite : MultiplayerComposite
|
|
|
|
{
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
|
|
|
UpdateableBeatmapBackgroundSprite sprite;
|
|
|
|
|
|
|
|
InternalChild = sprite = CreateBackgroundSprite();
|
|
|
|
|
2019-02-21 17:56:34 +08:00
|
|
|
CurrentItem.BindValueChanged(e => sprite.Beatmap.Value = e.NewValue?.Beatmap, true);
|
2019-02-05 18:00:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
protected virtual UpdateableBeatmapBackgroundSprite CreateBackgroundSprite() => new UpdateableBeatmapBackgroundSprite { RelativeSizeAxes = Axes.Both };
|
|
|
|
}
|
|
|
|
}
|