public TeamDisplay(TournamentTeam team, Color4 colour, bool flip) : base(team) { RelativeSizeAxes = Axes.Both; var anchor = flip ? Anchor.CentreRight : Anchor.CentreLeft; Anchor = Origin = anchor; Flag.Anchor = Flag.Origin = anchor; Flag.RelativeSizeAxes = Axes.None; Flag.Size = new Vector2(60, 40); Flag.Margin = new MarginPadding(20); InternalChild = new Container { RelativeSizeAxes = Axes.Both, Children = new Drawable[] { Flag, new OsuSpriteText { Text = team?.FullName.Value.ToUpper() ?? "???", X = (flip ? -1 : 1) * 90, Y = -10, Colour = colour, Font = TournamentFont.GetFont(typeface: TournamentTypeface.Aquatico, weight: FontWeight.Regular, size: 20), Origin = anchor, Anchor = anchor, }, } }; }
private void matchChanged(ValueChangedEvent <TournamentMatch> match) { InternalChildren = new Drawable[] { new OsuSpriteText { Anchor = Anchor.Centre, Origin = Anchor.Centre, Colour = Color4.White, Text = match.NewValue.Round.Value?.Name.Value ?? "Unknown Round", Font = TournamentFont.GetFont(typeface: TournamentTypeface.Aquatico, weight: FontWeight.Regular, size: 18), }, }; }
public RoundDisplay(TournamentMatch match) { var col = OsuColour.Gray(0.33f); InternalChildren = new Drawable[] { new FillFlowContainer { AutoSizeAxes = Axes.Both, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 10), Children = new Drawable[] { new OsuSpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Colour = col, Text = "WINNER", Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 20, FontWeight.Regular), }, new OsuSpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Colour = col, Text = match.Round.Value?.Name.Value ?? "Unknown Round", Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 50, FontWeight.Light), Spacing = new Vector2(10, 0), }, new OsuSpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Colour = col, Text = match.Date.Value.ToUniversalTime().ToString("MM dd HH:mm UTC+8"), Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 20, FontWeight.Light), }, } } }; }
public TeamDisplay(TournamentTeam team, string teamName, Color4 colour) : base(team) { AutoSizeAxes = Axes.Both; Flag.Anchor = Flag.Origin = Anchor.TopCentre; Flag.RelativeSizeAxes = Axes.None; Flag.Size = new Vector2(300, 200); Flag.Scale = new Vector2(0.4f); Flag.Margin = new MarginPadding { Bottom = 20 }; InternalChild = new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 5), Children = new Drawable[] { Flag, new OsuSpriteText { Text = team?.FullName.Value.ToUpper() ?? "???", Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 40, FontWeight.Light), Colour = Color4.Black, Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, }, new OsuSpriteText { Text = teamName.ToUpper(), Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 20, FontWeight.Regular), Colour = colour, Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, } } }; }