From d5c56aab7a03d3b8539de7fd6bef0e5a09efe6b9 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Fri, 28 Apr 2017 21:05:00 +0300 Subject: [PATCH] Initial commit --- osu.Game/Screens/Play/PlayerLoader.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 765abd9873..69aef1ceb9 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -14,6 +14,7 @@ using osu.Game.Graphics.Sprites; using osu.Game.Screens.Backgrounds; using osu.Game.Screens.Menu; using OpenTK; +using osu.Framework.Localisation; namespace osu.Game.Screens.Play { @@ -177,8 +178,20 @@ namespace osu.Game.Screens.Play } + private readonly SpriteText title; + private readonly SpriteText artist; + private readonly WorkingBeatmap beatmap; + + [BackgroundDependencyLoader] + private void load(LocalisationEngine localisation) + { + title.Current = localisation.GetUnicodePreference(beatmap.BeatmapSetInfo.Metadata.TitleUnicode, beatmap.BeatmapSetInfo.Metadata.Title); + artist.Current = localisation.GetUnicodePreference(beatmap.BeatmapSetInfo.Metadata.ArtistUnicode, beatmap.BeatmapSetInfo.Metadata.Artist); + } + public BeatmapMetadataDisplay(WorkingBeatmap beatmap) { + this.beatmap = beatmap; var metadata = beatmap?.BeatmapInfo?.Metadata ?? new BeatmapMetadata(); AutoSizeAxes = Axes.Both; @@ -192,7 +205,7 @@ namespace osu.Game.Screens.Play Direction = FillDirection.Vertical, Children = new Drawable[] { - new OsuSpriteText + title = new OsuSpriteText { Text = metadata.Title, TextSize = 36, @@ -200,7 +213,7 @@ namespace osu.Game.Screens.Play Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, }, - new OsuSpriteText + artist = new OsuSpriteText { Text = metadata.Artist, TextSize = 26,