mirror of
https://github.com/ppy/osu.git
synced 2026-05-18 01:30:05 +08:00
Add grouping separator to PP display in user profile overlay
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.LocalisationExtensions;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@@ -268,21 +269,23 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Direction = FillDirection.Horizontal,
|
||||
Children = new[]
|
||||
{
|
||||
new OsuSpriteText
|
||||
new SpriteTextWithTooltip
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Font = font,
|
||||
Text = $"{Score.PP:0}",
|
||||
Colour = colourProvider.Highlight1
|
||||
Text = Score.PP.ToLocalisableString(@"N0"),
|
||||
TooltipText = Score.PP.ToLocalisableString(@"N"),
|
||||
Colour = colourProvider.Highlight1,
|
||||
},
|
||||
new OsuSpriteText
|
||||
new SpriteTextWithTooltip
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Font = font.With(size: 12),
|
||||
Text = "pp",
|
||||
Colour = colourProvider.Light3
|
||||
TooltipText = Score.PP.ToLocalisableString(@"N"),
|
||||
Colour = colourProvider.Light3,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using osu.Framework.Extensions.LocalisationExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
@@ -44,7 +45,9 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Child = new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold, italics: true),
|
||||
Text = Score.PP.HasValue ? $"{Score.PP * weight:0}pp" : string.Empty,
|
||||
Text = Score.PP.HasValue
|
||||
? LocalisableString.Interpolate($"{Score.PP * weight:N0}pp")
|
||||
: string.Empty,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user