A game framework written with osu! in mind.

Use LocalisableString in IHasText.

+3 -7
+3 -1
osu.Framework/Graphics/Sprites/IHasText.cs
··· 1 1 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. 2 2 // See the LICENCE file in the repository root for full licence text. 3 3 4 + using osu.Framework.Localisation; 5 + 4 6 namespace osu.Framework.Graphics.Sprites 5 7 { 6 8 /// <summary> ··· 8 10 /// </summary> 9 11 public interface IHasText : IDrawable 10 12 { 11 - string Text { get; set; } 13 + LocalisableString Text { get; set; } 12 14 } 13 15 }
-6
osu.Framework/Graphics/Sprites/SpriteText.cs
··· 105 105 106 106 private string displayedText => localisedText?.Value ?? text.ToString(); 107 107 108 - string IHasText.Text 109 - { 110 - get => Text.ToString(); 111 - set => Text = value; 112 - } 113 - 114 108 private FontUsage font = FontUsage.Default; 115 109 116 110 /// <summary>