2020-03-06 15:07:54 +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.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2020-03-06 15:07:54 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
using osu.Game.Tournament.Components;
|
|
|
|
using osu.Game.Tournament.Models;
|
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Tournament.Screens.Drawings.Components
|
|
|
|
{
|
|
|
|
public partial class GroupTeam : DrawableTournamentTeam
|
|
|
|
{
|
|
|
|
private readonly FillFlowContainer innerContainer;
|
|
|
|
|
|
|
|
public GroupTeam(TournamentTeam team)
|
|
|
|
: base(team)
|
|
|
|
{
|
|
|
|
Width = 36;
|
|
|
|
AutoSizeAxes = Axes.Y;
|
|
|
|
|
|
|
|
Flag.Anchor = Anchor.TopCentre;
|
|
|
|
Flag.Origin = Anchor.TopCentre;
|
|
|
|
|
|
|
|
AcronymText.Anchor = Anchor.TopCentre;
|
|
|
|
AcronymText.Origin = Anchor.TopCentre;
|
|
|
|
AcronymText.Text = team.Acronym.Value.ToUpperInvariant();
|
|
|
|
AcronymText.Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 10);
|
2020-10-26 13:27:55 +08:00
|
|
|
Flag.Scale = new Vector2(0.48f);
|
2020-03-06 15:07:54 +08:00
|
|
|
|
|
|
|
InternalChildren = new Drawable[]
|
|
|
|
{
|
|
|
|
innerContainer = new FillFlowContainer
|
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
|
|
|
|
Direction = FillDirection.Vertical,
|
|
|
|
Spacing = new Vector2(0, 5f),
|
|
|
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
{
|
|
|
|
Flag,
|
|
|
|
AcronymText
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
|
|
|
base.LoadComplete();
|
|
|
|
innerContainer.ScaleTo(1.5f);
|
|
|
|
innerContainer.ScaleTo(1f, 200);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|