From a188d6662fa72452f82b94815be841b5be558f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sun, 24 Oct 2021 19:44:32 +0200 Subject: [PATCH] Use beatmap card in solo spectator screen --- osu.Game/Screens/Play/SoloSpectator.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Play/SoloSpectator.cs b/osu.Game/Screens/Play/SoloSpectator.cs index 5ecdb91718..45601999a0 100644 --- a/osu.Game/Screens/Play/SoloSpectator.cs +++ b/osu.Game/Screens/Play/SoloSpectator.cs @@ -12,6 +12,7 @@ using osu.Framework.Threading; using osu.Game.Audio; using osu.Game.Beatmaps; +using osu.Game.Beatmaps.Drawables.Cards; using osu.Game.Configuration; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; @@ -20,7 +21,7 @@ using osu.Game.Online.API.Requests; using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.Spectator; -using osu.Game.Overlays.BeatmapListing.Panels; +using osu.Game.Overlays; using osu.Game.Overlays.Settings; using osu.Game.Rulesets; using osu.Game.Screens.OnlinePlay.Match.Components; @@ -52,6 +53,9 @@ public class SoloSpectator : SpectatorScreen, IPreviewTrackOwner [Resolved] private BeatmapModelDownloader beatmapDownloader { get; set; } + [Cached] + private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple); + private Container beatmapPanelContainer; private TriangleButton watchButton; private SettingsCheckbox automaticDownload; @@ -73,7 +77,7 @@ public SoloSpectator([NotNull] APIUser targetUser) } [BackgroundDependencyLoader] - private void load(OsuColour colours, OsuConfigManager config) + private void load(OsuConfigManager config) { InternalChild = new Container { @@ -88,7 +92,7 @@ private void load(OsuColour colours, OsuConfigManager config) { new Box { - Colour = colours.GreySeafoamDark, + Colour = colourProvider.Background5, RelativeSizeAxes = Axes.Both, }, new FillFlowContainer @@ -229,7 +233,7 @@ private void showBeatmapPanel(SpectatorState state) onlineBeatmapRequest.Success += beatmapSet => Schedule(() => { this.beatmapSet = beatmapSet; - beatmapPanelContainer.Child = new GridBeatmapPanel(this.beatmapSet); + beatmapPanelContainer.Child = new BeatmapCard(this.beatmapSet); checkForAutomaticDownload(); });