Update all beatmap overlay views to use APIBeatmap/APIBeatmapSet

This commit is contained in:
Dean Herbert
2021-10-29 17:58:46 +09:00
parent b8ee7e05f4
commit a16c8f1ebc
45 changed files with 471 additions and 613 deletions

View File

@ -6,6 +6,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays.BeatmapSet.Buttons;
using osu.Game.Screens.Select.Details;
using osuTK;
@ -21,9 +22,9 @@ namespace osu.Game.Overlays.BeatmapSet
private readonly AdvancedStats advanced;
private readonly DetailBox ratingBox;
private BeatmapSetInfo beatmapSet;
private APIBeatmapSet beatmapSet;
public BeatmapSetInfo BeatmapSet
public APIBeatmapSet BeatmapSet
{
get => beatmapSet;
set
@ -37,9 +38,9 @@ namespace osu.Game.Overlays.BeatmapSet
}
}
private BeatmapInfo beatmapInfo;
private IBeatmapInfo beatmapInfo;
public BeatmapInfo BeatmapInfo
public IBeatmapInfo BeatmapInfo
{
get => beatmapInfo;
set
@ -53,7 +54,7 @@ namespace osu.Game.Overlays.BeatmapSet
private void updateDisplay()
{
Ratings.Ratings = BeatmapSet?.Ratings;
ratingBox.Alpha = BeatmapSet?.OnlineInfo?.Status > 0 ? 1 : 0;
ratingBox.Alpha = BeatmapSet?.Status > 0 ? 1 : 0;
}
public Details()