mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Use working beatmap to retrieve metadata for now
This commit is contained in:
parent
27cc68152d
commit
dd3a6c5673
@ -4,6 +4,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -46,15 +47,10 @@ namespace osu.Game.Screens.Ranking.Expanded
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(BeatmapManager beatmaps)
|
private void load(Bindable<WorkingBeatmap> working)
|
||||||
{
|
{
|
||||||
var metadata = score.Beatmap.Metadata;
|
var beatmap = working.Value.BeatmapInfo;
|
||||||
|
var metadata = beatmap.Metadata;
|
||||||
if (metadata == null)
|
|
||||||
{
|
|
||||||
var beatmap = beatmaps.QueryBeatmap(b => b.ID == score.BeatmapInfoID);
|
|
||||||
metadata = beatmap.Metadata ?? beatmap.BeatmapSet.Metadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
var topStatistics = new List<StatisticDisplay>
|
var topStatistics = new List<StatisticDisplay>
|
||||||
{
|
{
|
||||||
@ -129,7 +125,7 @@ namespace osu.Game.Screens.Ranking.Expanded
|
|||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new StarRatingDisplay(score.Beatmap)
|
new StarRatingDisplay(beatmap)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft
|
Origin = Anchor.CentreLeft
|
||||||
@ -157,7 +153,7 @@ namespace osu.Game.Screens.Ranking.Expanded
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Text = score.Beatmap.Version,
|
Text = beatmap.Version,
|
||||||
Font = OsuFont.Torus.With(size: 16, weight: FontWeight.SemiBold),
|
Font = OsuFont.Torus.With(size: 16, weight: FontWeight.SemiBold),
|
||||||
},
|
},
|
||||||
new OsuTextFlowContainer(s => s.Font = OsuFont.Torus.With(size: 12))
|
new OsuTextFlowContainer(s => s.Font = OsuFont.Torus.With(size: 12))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user