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:
parent
cf83be1cd0
commit
aecbc31ffa
@ -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);
|
||||
|
||||
|
13
osu.Game/Screens/Multi/Components/MultiplayerListSprite.cs
Normal file
13
osu.Game/Screens/Multi/Components/MultiplayerListSprite.cs
Normal 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 };
|
||||
}
|
||||
}
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user