Move BeatmapSetOnlineInfo to an interface type

This commit is contained in:
Dean Herbert
2021-10-20 18:43:48 +09:00
parent ea2b2a3beb
commit 0706ad70fb
19 changed files with 222 additions and 92 deletions

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays;
using osu.Game.Overlays.BeatmapListing;
using osuTK;
@ -111,7 +112,7 @@ namespace osu.Game.Tests.Visual.UserInterface
private static readonly BeatmapSetInfo beatmap_set = new BeatmapSetInfo
{
OnlineInfo = new BeatmapSetOnlineInfo
OnlineInfo = new APIBeatmapSet
{
Covers = new BeatmapSetOnlineCovers
{
@ -122,7 +123,7 @@ namespace osu.Game.Tests.Visual.UserInterface
private static readonly BeatmapSetInfo no_cover_beatmap_set = new BeatmapSetInfo
{
OnlineInfo = new BeatmapSetOnlineInfo
OnlineInfo = new APIBeatmapSet
{
Covers = new BeatmapSetOnlineCovers
{

View File

@ -11,6 +11,7 @@ using osu.Game.Users;
using System;
using osu.Framework.Graphics.Shapes;
using System.Collections.Generic;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Tests.Visual.UserInterface
{
@ -69,7 +70,7 @@ namespace osu.Game.Tests.Visual.UserInterface
Id = 100
}
},
OnlineInfo = new BeatmapSetOnlineInfo
OnlineInfo = new APIBeatmapSet
{
Covers = new BeatmapSetOnlineCovers
{
@ -90,7 +91,7 @@ namespace osu.Game.Tests.Visual.UserInterface
Id = 100
}
},
OnlineInfo = new BeatmapSetOnlineInfo
OnlineInfo = new APIBeatmapSet
{
Covers = new BeatmapSetOnlineCovers
{
@ -115,7 +116,7 @@ namespace osu.Game.Tests.Visual.UserInterface
Id = 100
}
},
OnlineInfo = new BeatmapSetOnlineInfo
OnlineInfo = new APIBeatmapSet
{
Covers = new BeatmapSetOnlineCovers
{
@ -136,7 +137,7 @@ namespace osu.Game.Tests.Visual.UserInterface
Id = 100
}
},
OnlineInfo = new BeatmapSetOnlineInfo
OnlineInfo = new APIBeatmapSet
{
Covers = new BeatmapSetOnlineCovers
{

View File

@ -13,6 +13,7 @@ using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API.Requests.Responses;
using osuTK;
namespace osu.Game.Tests.Visual.UserInterface
@ -133,7 +134,7 @@ namespace osu.Game.Tests.Visual.UserInterface
private static BeatmapSetInfo createBeatmapWithCover(string coverUrl) => new BeatmapSetInfo
{
OnlineInfo = new BeatmapSetOnlineInfo
OnlineInfo = new APIBeatmapSet
{
Covers = new BeatmapSetOnlineCovers { Cover = coverUrl }
}
@ -148,7 +149,7 @@ namespace osu.Game.Tests.Visual.UserInterface
this.loadDelay = loadDelay;
}
protected override Drawable CreateDrawable(BeatmapSetInfo model)
protected override Drawable CreateDrawable(IBeatmapSetOnlineInfo model)
{
if (model == null)
return null;
@ -167,7 +168,7 @@ namespace osu.Game.Tests.Visual.UserInterface
{
private readonly int loadDelay;
public TestBeatmapSetCover(BeatmapSetInfo set, int loadDelay)
public TestBeatmapSetCover(IBeatmapSetOnlineInfo set, int loadDelay)
: base(set)
{
this.loadDelay = loadDelay;