mirror of
https://github.com/ppy/osu
synced 2024-12-29 02:12:43 +00:00
create instance of BeatmapInfo
for use in ScoreBeatmapMetadataContainer
This commit is contained in:
parent
c73eff7c89
commit
486fbd2531
@ -50,6 +50,24 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(RulesetStore rulesets)
|
||||
{
|
||||
var beatmapSet = Score.BeatmapSet ?? Score.Beatmap?.BeatmapSet;
|
||||
var beatmapInfo = new BeatmapInfo();
|
||||
|
||||
if (beatmapSet != null)
|
||||
{
|
||||
var beatmapMetadata = new BeatmapMetadata
|
||||
{
|
||||
Artist = beatmapSet.Artist,
|
||||
ArtistUnicode = beatmapSet.ArtistUnicode,
|
||||
Title = beatmapSet.Title,
|
||||
TitleUnicode = beatmapSet.TitleUnicode,
|
||||
};
|
||||
|
||||
beatmapInfo.Metadata = beatmapMetadata;
|
||||
if (Score.Beatmap?.DifficultyName != null)
|
||||
beatmapInfo.DifficultyName = Score.Beatmap.DifficultyName;
|
||||
}
|
||||
|
||||
AddInternal(new ProfileItemContainer
|
||||
{
|
||||
Children = new Drawable[]
|
||||
@ -84,7 +102,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Spacing = new Vector2(0, 2),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ScoreBeatmapMetadataContainer(Score.Beatmap),
|
||||
new ScoreBeatmapMetadataContainer(beatmapInfo),
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
|
Loading…
Reference in New Issue
Block a user