1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Use beatmap cards in beatmap listing overlay

This commit is contained in:
Bartłomiej Dach 2021-10-23 16:55:05 +02:00
parent 84a36ab4a9
commit 0f9ebe3d5d
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
2 changed files with 7 additions and 8 deletions

View File

@ -119,7 +119,7 @@ namespace osu.Game.Overlays.BeatmapListing
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
{
sortControlBackground.Colour = colourProvider.Background5;
sortControlBackground.Colour = colourProvider.Background4;
}
public void Search(string query)

View File

@ -15,12 +15,11 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Input.Events;
using osu.Game.Audio;
using osu.Game.Beatmaps.Drawables.Cards;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays.BeatmapListing;
using osu.Game.Overlays.BeatmapListing.Panels;
using osu.Game.Resources.Localisation.Web;
using osuTK;
using osuTK.Graphics;
@ -34,7 +33,7 @@ namespace osu.Game.Overlays
private Drawable currentContent;
private Container panelTarget;
private FillFlowContainer<BeatmapPanel> foundContent;
private FillFlowContainer<BeatmapCard> foundContent;
private NotFoundDrawable notFoundContent;
private SupporterRequiredDrawable supporterRequiredContent;
private BeatmapListingFilterControl filterControl;
@ -69,7 +68,7 @@ namespace osu.Game.Overlays
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = ColourProvider.Background4,
Colour = ColourProvider.Background5,
},
panelTarget = new Container
{
@ -79,7 +78,7 @@ namespace osu.Game.Overlays
Padding = new MarginPadding { Horizontal = 20 },
Children = new Drawable[]
{
foundContent = new FillFlowContainer<BeatmapPanel>(),
foundContent = new FillFlowContainer<BeatmapCard>(),
notFoundContent = new NotFoundDrawable(),
supporterRequiredContent = new SupporterRequiredDrawable(),
}
@ -136,7 +135,7 @@ namespace osu.Game.Overlays
return;
}
var newPanels = searchResult.Results.Select<APIBeatmapSet, BeatmapPanel>(b => new GridBeatmapPanel(b)
var newPanels = searchResult.Results.Select(b => new BeatmapCard(b)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@ -152,7 +151,7 @@ namespace osu.Game.Overlays
}
// spawn new children with the contained so we only clear old content at the last moment.
var content = new FillFlowContainer<BeatmapPanel>
var content = new FillFlowContainer<BeatmapCard>
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,