mirror of https://github.com/ppy/osu
Use beatmap card in solo spectator screen
This commit is contained in:
parent
ec2265d5bb
commit
a188d6662f
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue