1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 21:47:25 +08:00
osu-lazer/osu.Game/Screens/Ranking/Statistics/SimpleStatisticRow.cs
2020-08-26 19:33:33 +02:00

35 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 JetBrains.Annotations;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Screens.Ranking.Statistics
{
/// <summary>
/// Contains textual statistic data to display in a <see cref="DrawableSimpleStatisticRow"/>.
/// </summary>
public class SimpleStatisticRow : IStatisticRow
{
/// <summary>
/// The number of columns to layout the <see cref="Items"/> in.
/// </summary>
public int Columns { get; set; }
/// <summary>
/// The <see cref="StatisticItem"/>s that this row should contain.
/// </summary>
[ItemNotNull]
public SimpleStatisticItem[] Items { get; set; }
public Drawable CreateDrawableStatisticRow() => new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding(20),
Child = new DrawableSimpleStatisticRow(Columns, Items)
};
}
}