2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2021-10-18 02:50:44 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
|
|
using Humanizer;
|
|
|
|
|
using osu.Framework.Extensions.LocalisationExtensions;
|
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Beatmaps.Drawables.Cards.Statistics
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Shows the number of times the given beatmap set has been played.
|
|
|
|
|
/// </summary>
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class PlayCountStatistic : BeatmapCardStatistic
|
2021-10-18 02:50:44 +08:00
|
|
|
|
{
|
|
|
|
|
public PlayCountStatistic(IBeatmapSetOnlineInfo onlineInfo)
|
|
|
|
|
{
|
|
|
|
|
Icon = FontAwesome.Regular.PlayCircle;
|
|
|
|
|
Text = onlineInfo.PlayCount.ToMetric(decimals: 1);
|
|
|
|
|
TooltipText = BeatmapsStrings.PanelPlaycount(onlineInfo.PlayCount.ToLocalisableString(@"N0"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|