2019-09-27 16:33:52 +00: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.
|
|
|
|
|
|
2019-11-28 17:09:05 +00:00
|
|
|
|
using System.Collections.Generic;
|
2021-08-29 12:00:28 +00:00
|
|
|
|
using osu.Framework.Extensions.LocalisationExtensions;
|
2019-09-27 16:33:52 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2021-07-30 13:24:10 +00:00
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
2019-11-27 18:56:22 +00:00
|
|
|
|
using osu.Game.Users;
|
2019-09-27 16:33:52 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Rankings.Tables
|
|
|
|
|
{
|
2019-11-27 20:35:02 +00:00
|
|
|
|
public class ScoresTable : UserBasedTable
|
2019-09-27 16:33:52 +00:00
|
|
|
|
{
|
2019-11-28 17:09:05 +00:00
|
|
|
|
public ScoresTable(int page, IReadOnlyList<UserStatistics> rankings)
|
|
|
|
|
: base(page, rankings)
|
2019-09-27 16:33:52 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-27 16:46:49 +00:00
|
|
|
|
protected override RankingsTableColumn[] CreateUniqueHeaders() => new[]
|
2019-09-27 16:33:52 +00:00
|
|
|
|
{
|
2021-07-30 13:24:10 +00:00
|
|
|
|
new RankingsTableColumn(RankingsStrings.StatTotalScore, Anchor.Centre, new Dimension(GridSizeMode.AutoSize)),
|
|
|
|
|
new RankingsTableColumn(RankingsStrings.StatRankedScore, Anchor.Centre, new Dimension(GridSizeMode.AutoSize), true)
|
2019-09-27 16:33:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2019-11-27 20:58:31 +00:00
|
|
|
|
protected override Drawable[] CreateUniqueContent(UserStatistics item) => new Drawable[]
|
2019-09-27 16:33:52 +00:00
|
|
|
|
{
|
2021-07-31 05:27:20 +00:00
|
|
|
|
new ColouredRowText
|
2019-09-27 16:33:52 +00:00
|
|
|
|
{
|
2021-07-31 05:29:38 +00:00
|
|
|
|
Text = item.TotalScore.ToLocalisableString(@"N0"),
|
2019-11-27 20:35:02 +00:00
|
|
|
|
},
|
|
|
|
|
new RowText
|
2019-09-27 16:33:52 +00:00
|
|
|
|
{
|
2021-07-31 05:29:38 +00:00
|
|
|
|
Text = item.RankedScore.ToLocalisableString(@"N0")
|
2019-11-27 20:35:02 +00:00
|
|
|
|
}
|
|
|
|
|
};
|
2019-09-27 16:33:52 +00:00
|
|
|
|
}
|
|
|
|
|
}
|