mirror of
https://github.com/ppy/osu.git
synced 2024-11-09 01:37:52 +08:00
be2d616e34
Previously such use cases have been returning `null` values just fine since `GetLocalisableString` was returning `LocalisableFormattableString`, and these null values were wrapped in `LocalisableString`s implicitly, therefore not requiring an explicit fallback string and `null` doesn't break anything.
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
// 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.
|
|
|
|
using System.Collections.Generic;
|
|
using osu.Framework.Extensions.LocalisationExtensions;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Framework.Localisation;
|
|
using osu.Game.Resources.Localisation.Web;
|
|
using osu.Game.Users;
|
|
|
|
namespace osu.Game.Overlays.Rankings.Tables
|
|
{
|
|
public class PerformanceTable : UserBasedTable
|
|
{
|
|
public PerformanceTable(int page, IReadOnlyList<UserStatistics> rankings)
|
|
: base(page, rankings)
|
|
{
|
|
}
|
|
|
|
protected override RankingsTableColumn[] CreateUniqueHeaders() => new[]
|
|
{
|
|
new RankingsTableColumn(RankingsStrings.StatPerformance, Anchor.Centre, new Dimension(GridSizeMode.AutoSize), true),
|
|
};
|
|
|
|
protected override Drawable[] CreateUniqueContent(UserStatistics item) => new Drawable[]
|
|
{
|
|
new RowText { Text = item.PP?.ToLocalisableString(@"N0") ?? default(LocalisableString), }
|
|
};
|
|
}
|
|
}
|