1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 23:07:26 +08:00

Added suggested changes

This commit is contained in:
EVAST9919 2017-04-30 17:05:00 +03:00
parent e522a8c433
commit e9094bac51

View File

@ -179,19 +179,18 @@ namespace osu.Game.Screens.Play
private readonly SpriteText title; private readonly SpriteText title;
private readonly SpriteText artist; private readonly SpriteText artist;
private readonly WorkingBeatmap beatmap; private readonly BeatmapMetadata metadata;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(LocalisationEngine localisation) private void load(LocalisationEngine localisation)
{ {
title.Current = localisation.GetUnicodePreference(beatmap.BeatmapSetInfo.Metadata.TitleUnicode, beatmap.BeatmapSetInfo.Metadata.Title); title.Current = localisation.GetUnicodePreference(metadata.TitleUnicode, metadata.Title);
artist.Current = localisation.GetUnicodePreference(beatmap.BeatmapSetInfo.Metadata.ArtistUnicode, beatmap.BeatmapSetInfo.Metadata.Artist); artist.Current = localisation.GetUnicodePreference(metadata.ArtistUnicode, metadata.Artist);
} }
public BeatmapMetadataDisplay(WorkingBeatmap beatmap) public BeatmapMetadataDisplay(WorkingBeatmap beatmap)
{ {
this.beatmap = beatmap; metadata = beatmap?.BeatmapInfo?.Metadata ?? new BeatmapMetadata();
var metadata = beatmap?.BeatmapInfo?.Metadata ?? new BeatmapMetadata();
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Children = new Drawable[] Children = new Drawable[]