mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 16:27:26 +08:00
Localise level badge tooltip.
This commit is contained in:
parent
4d276b114b
commit
306a34a802
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Header.Components
|
||||
@ -19,13 +20,13 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
{
|
||||
public readonly Bindable<User> User = new Bindable<User>();
|
||||
|
||||
public LocalisableString TooltipText { get; }
|
||||
public LocalisableString TooltipText { get; private set; }
|
||||
|
||||
private OsuSpriteText levelText;
|
||||
|
||||
public LevelBadge()
|
||||
{
|
||||
TooltipText = "level";
|
||||
TooltipText = UsersStrings.ShowStatsLevel("0");
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -53,6 +54,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
private void updateLevel(User user)
|
||||
{
|
||||
levelText.Text = user?.Statistics?.Level.Current.ToString() ?? "0";
|
||||
TooltipText = UsersStrings.ShowStatsLevel(user?.Statistics?.Level.Current.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user