tangled
alpha
login
or
join now
keii.dev
/
osu-framework
0
fork
atom
A game framework written with osu! in mind.
0
fork
atom
overview
issues
pulls
pipelines
Use LocalisableString in IHasText.
Huo Yaoyuan
6 years ago
528d261c
9b8ee6b7
+3
-7
2 changed files
expand all
collapse all
unified
split
osu.Framework
Graphics
Sprites
IHasText.cs
SpriteText.cs
+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
4
+
using osu.Framework.Localisation;
5
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
11
-
string Text { get; set; }
13
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
108
-
string IHasText.Text
109
109
-
{
110
110
-
get => Text.ToString();
111
111
-
set => Text = value;
112
112
-
}
113
113
-
114
108
private FontUsage font = FontUsage.Default;
115
109
116
110
/// <summary>