2021-10-18 02:50:44 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2021-10-18 02:50:44 +08:00
|
|
|
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"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|