1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 16:42:57 +08:00

Use BeatmapSetCoverType.List for lobby listing

This commit is contained in:
David Zhao 2019-03-05 12:08:14 +09:00
parent cf83be1cd0
commit aecbc31ffa
3 changed files with 19 additions and 3 deletions

View File

@ -18,9 +18,12 @@ namespace osu.Game.Beatmaps.Drawables
[Resolved]
private BeatmapManager beatmaps { get; set; }
public UpdateableBeatmapBackgroundSprite()
private readonly BeatmapSetCoverType beatmapSetCoverType;
public UpdateableBeatmapBackgroundSprite(BeatmapSetCoverType beatmapSetCoverType = BeatmapSetCoverType.Cover)
{
Beatmap.BindValueChanged(b => Model = b.NewValue);
this.beatmapSetCoverType = beatmapSetCoverType;
}
protected override Drawable CreateDrawable(BeatmapInfo model)
@ -32,7 +35,7 @@ namespace osu.Game.Beatmaps.Drawables
var localBeatmap = beatmaps.GetWorkingBeatmap(model);
if (localBeatmap.BeatmapInfo.ID == 0 && model?.BeatmapSet?.OnlineInfo != null)
drawable = new BeatmapSetCover(model.BeatmapSet);
drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType);
else
drawable = new BeatmapBackgroundSprite(localBeatmap);

View File

@ -0,0 +1,13 @@
// 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.Graphics;
using osu.Game.Beatmaps.Drawables;
namespace osu.Game.Screens.Multi.Components
{
public class MultiplayerListSprite : MultiplayerBackgroundSprite
{
protected override UpdateableBeatmapBackgroundSprite CreateBackgroundSprite() => new UpdateableBeatmapBackgroundSprite(BeatmapSetCoverType.List) { RelativeSizeAxes = Axes.Both };
}
}

View File

@ -137,7 +137,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
Width = cover_width,
Masking = true,
Margin = new MarginPadding { Left = side_strip_width },
Child = new MultiplayerBackgroundSprite { RelativeSizeAxes = Axes.Both }
Child = new MultiplayerListSprite { RelativeSizeAxes = Axes.Both }
},
new Container
{