2019-09-28 00:33:52 +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.
|
|
|
|
|
|
2019-11-29 01:09:05 +08:00
|
|
|
|
using System.Collections.Generic;
|
2019-09-28 00:33:52 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2019-11-28 02:56:22 +08:00
|
|
|
|
using osu.Game.Users;
|
2019-09-28 00:33:52 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Rankings.Tables
|
|
|
|
|
{
|
2019-11-28 04:35:02 +08:00
|
|
|
|
public class ScoresTable : UserBasedTable
|
2019-09-28 00:33:52 +08:00
|
|
|
|
{
|
2019-11-29 01:09:05 +08:00
|
|
|
|
public ScoresTable(int page, IReadOnlyList<UserStatistics> rankings)
|
|
|
|
|
: base(page, rankings)
|
2019-09-28 00:33:52 +08:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-28 04:35:02 +08:00
|
|
|
|
protected override TableColumn[] CreateUniqueHeaders() => new[]
|
2019-09-28 00:33:52 +08:00
|
|
|
|
{
|
2019-11-03 19:31:23 +08:00
|
|
|
|
new TableColumn("Total Score", Anchor.Centre, new Dimension(GridSizeMode.AutoSize)),
|
2019-11-28 04:35:02 +08:00
|
|
|
|
new TableColumn("Ranked Score", Anchor.Centre, new Dimension(GridSizeMode.AutoSize))
|
2019-09-28 00:33:52 +08:00
|
|
|
|
};
|
|
|
|
|
|
2019-11-28 04:58:31 +08:00
|
|
|
|
protected override Drawable[] CreateUniqueContent(UserStatistics item) => new Drawable[]
|
2019-09-28 00:33:52 +08:00
|
|
|
|
{
|
2019-11-28 04:35:02 +08:00
|
|
|
|
new ColoredRowText
|
2019-09-28 00:33:52 +08:00
|
|
|
|
{
|
2019-11-28 04:35:02 +08:00
|
|
|
|
Text = $@"{item.TotalScore:N0}",
|
|
|
|
|
},
|
|
|
|
|
new RowText
|
2019-09-28 00:33:52 +08:00
|
|
|
|
{
|
2019-11-28 04:35:02 +08:00
|
|
|
|
Text = $@"{item.RankedScore:N0}",
|
|
|
|
|
}
|
|
|
|
|
};
|
2019-09-28 00:33:52 +08:00
|
|
|
|
|
2020-03-16 05:03:54 +08:00
|
|
|
|
protected override string HighlightedColumn => @"Ranked Score";
|
2019-09-28 00:33:52 +08:00
|
|
|
|
}
|
|
|
|
|
}
|