2020-03-06 07:07:54 +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.
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2020-03-06 07:07:54 +00:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
using osu.Game.Tournament.Models;
|
|
|
|
|
|
|
|
namespace osu.Game.Tournament.Components
|
|
|
|
{
|
|
|
|
public class RoundDisplay : CompositeDrawable
|
|
|
|
{
|
|
|
|
public RoundDisplay(TournamentMatch match)
|
|
|
|
{
|
2020-03-17 04:16:18 +00:00
|
|
|
AutoSizeAxes = Axes.Y;
|
|
|
|
RelativeSizeAxes = Axes.X;
|
2020-03-06 07:07:54 +00:00
|
|
|
|
|
|
|
InternalChildren = new Drawable[]
|
|
|
|
{
|
|
|
|
new FillFlowContainer
|
|
|
|
{
|
2020-03-17 04:16:18 +00:00
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
RelativeSizeAxes = Axes.X,
|
2020-03-06 07:07:54 +00:00
|
|
|
Direction = FillDirection.Vertical,
|
|
|
|
Children = new Drawable[]
|
|
|
|
{
|
2020-03-17 04:16:18 +00:00
|
|
|
new DrawableTournamentHeaderText(false)
|
|
|
|
{
|
|
|
|
Anchor = Anchor.TopLeft,
|
|
|
|
Origin = Anchor.TopLeft,
|
|
|
|
},
|
2020-03-06 07:07:54 +00:00
|
|
|
new TournamentSpriteText
|
|
|
|
{
|
2020-03-17 04:16:18 +00:00
|
|
|
Anchor = Anchor.TopLeft,
|
|
|
|
Origin = Anchor.TopLeft,
|
2020-03-06 07:07:54 +00:00
|
|
|
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
|
|
|
|
Font = OsuFont.Torus.With(size: 26, weight: FontWeight.SemiBold)
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|