mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 20:05:29 +08: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]
|
[BackgroundDependencyLoader]
|
||||||
private void load(RulesetStore rulesets)
|
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
|
AddInternal(new ProfileItemContainer
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -84,7 +102,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
|||||||
Spacing = new Vector2(0, 2),
|
Spacing = new Vector2(0, 2),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new ScoreBeatmapMetadataContainer(Score.Beatmap),
|
new ScoreBeatmapMetadataContainer(beatmapInfo),
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Loading…
Reference in New Issue
Block a user