1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-24 04:52:56 +08:00
osu-lazer/osu.Game.Tournament/Screens/Ladder/Components/DrawableTournamentGrouping.cs

43 lines
1.5 KiB
C#
Raw Normal View History

2019-03-04 12:24:19 +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.
2018-09-24 23:57:44 +08:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
2019-05-15 12:10:58 +08:00
using osu.Game.Graphics;
2018-09-24 23:57:44 +08:00
using osu.Game.Graphics.Sprites;
using osuTK.Graphics;
2018-09-24 23:57:44 +08:00
2018-09-25 03:21:48 +08:00
namespace osu.Game.Tournament.Screens.Ladder.Components
2018-09-24 23:57:44 +08:00
{
public class DrawableTournamentGrouping : CompositeDrawable
{
2018-09-25 01:31:48 +08:00
public DrawableTournamentGrouping(TournamentGrouping grouping, bool losers = false)
2018-09-24 23:57:44 +08:00
{
AutoSizeAxes = Axes.Both;
InternalChild = new FillFlowContainer
{
Direction = FillDirection.Vertical,
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
new OsuSpriteText
{
2018-10-13 06:10:13 +08:00
Text = grouping.Description.Value.ToUpper(),
Colour = Color4.Black,
2018-09-24 23:57:44 +08:00
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre
},
new OsuSpriteText
{
2018-09-25 01:31:48 +08:00
Text = ((losers ? "Losers " : "") + grouping.Name).ToUpper(),
2019-05-15 12:10:58 +08:00
Font = OsuFont.GetFont(weight: FontWeight.Bold),
Colour = Color4.Black,
2018-09-24 23:57:44 +08:00
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre
},
}
};
}
}
}