1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 04:22:54 +08:00
osu-lazer/osu.Game.Tournament/Screens/Ladder/Components/DrawableTournamentGrouping.cs
2019-05-15 13:10:58 +09:00

43 lines
1.5 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 osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osuTK.Graphics;
namespace osu.Game.Tournament.Screens.Ladder.Components
{
public class DrawableTournamentGrouping : CompositeDrawable
{
public DrawableTournamentGrouping(TournamentGrouping grouping, bool losers = false)
{
AutoSizeAxes = Axes.Both;
InternalChild = new FillFlowContainer
{
Direction = FillDirection.Vertical,
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
new OsuSpriteText
{
Text = grouping.Description.Value.ToUpper(),
Colour = Color4.Black,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre
},
new OsuSpriteText
{
Text = ((losers ? "Losers " : "") + grouping.Name).ToUpper(),
Font = OsuFont.GetFont(weight: FontWeight.Bold),
Colour = Color4.Black,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre
},
}
};
}
}
}