mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +08:00
simplify beatmap metadata logic in DrawableProfileScore
This commit is contained in:
parent
8791edf84c
commit
a5d7075ef1
@ -50,24 +50,6 @@ 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[]
|
||||
@ -102,7 +84,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Spacing = new Vector2(0, 2),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ScoreBeatmapMetadataContainer(beatmapInfo),
|
||||
new ScoreBeatmapMetadataContainer(Score.Beatmap),
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
|
Loading…
Reference in New Issue
Block a user