mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Update all beatmap overlay views to use APIBeatmap
/APIBeatmapSet
This commit is contained in:
@ -6,9 +6,9 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
|
||||
namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
@ -22,12 +22,12 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
private readonly Box background;
|
||||
private readonly SuccessRate successRate;
|
||||
|
||||
public readonly Bindable<BeatmapSetInfo> BeatmapSet = new Bindable<BeatmapSetInfo>();
|
||||
public readonly Bindable<APIBeatmapSet> BeatmapSet = new Bindable<APIBeatmapSet>();
|
||||
|
||||
public BeatmapInfo BeatmapInfo
|
||||
public APIBeatmap BeatmapInfo
|
||||
{
|
||||
get => successRate.BeatmapInfo;
|
||||
set => successRate.BeatmapInfo = value;
|
||||
get => successRate.Beatmap;
|
||||
set => successRate.Beatmap = value;
|
||||
}
|
||||
|
||||
public Info()
|
||||
@ -115,11 +115,11 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
BeatmapSet.ValueChanged += b =>
|
||||
{
|
||||
source.Text = b.NewValue?.Metadata.Source ?? string.Empty;
|
||||
tags.Text = b.NewValue?.Metadata.Tags ?? string.Empty;
|
||||
genre.Text = b.NewValue?.OnlineInfo?.Genre.Name ?? string.Empty;
|
||||
language.Text = b.NewValue?.OnlineInfo?.Language.Name ?? string.Empty;
|
||||
bool setHasLeaderboard = b.NewValue?.OnlineInfo?.Status > 0;
|
||||
source.Text = b.NewValue?.Source ?? string.Empty;
|
||||
tags.Text = b.NewValue?.Tags ?? string.Empty;
|
||||
genre.Text = b.NewValue?.Genre.Name ?? string.Empty;
|
||||
language.Text = b.NewValue?.Language.Name ?? string.Empty;
|
||||
bool setHasLeaderboard = b.NewValue?.Status > 0;
|
||||
successRate.Alpha = setHasLeaderboard ? 1 : 0;
|
||||
notRankedPlaceholder.Alpha = setHasLeaderboard ? 0 : 1;
|
||||
Height = setHasLeaderboard ? 270 : base_height;
|
||||
|
Reference in New Issue
Block a user