mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Bring design up-to-date with 2019 standards
This commit is contained in:
@ -7,10 +7,8 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Tournament.Components;
|
||||
using osu.Game.Tournament.Models;
|
||||
using osu.Game.Tournament.Screens.Showcase;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
@ -45,10 +43,6 @@ namespace osu.Game.Tournament.Screens.TeamWin
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Loop = true,
|
||||
},
|
||||
new TournamentLogo(false)
|
||||
{
|
||||
Y = 40,
|
||||
},
|
||||
mainContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -85,141 +79,99 @@ namespace osu.Game.Tournament.Screens.TeamWin
|
||||
|
||||
mainContainer.Children = new Drawable[]
|
||||
{
|
||||
new TeamFlagDisplay(match.Winner)
|
||||
{
|
||||
Size = new Vector2(300, 200),
|
||||
Scale = new Vector2(0.5f),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
X = -387,
|
||||
},
|
||||
new TournamentSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.TopLeft,
|
||||
Position = new Vector2(78, -70),
|
||||
Colour = OsuColour.Gray(0.33f),
|
||||
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
|
||||
Font = OsuFont.Torus.With(size: 30, weight: FontWeight.Regular)
|
||||
},
|
||||
new TeamWithPlayers(match.Winner, redWin)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Width = 0.5f,
|
||||
Height = 0.6f,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre
|
||||
Origin = Anchor.TopLeft,
|
||||
Position = new Vector2(78, 0),
|
||||
},
|
||||
new RoundDisplay(match)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Height = 0.25f,
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private class RoundDisplay : CompositeDrawable
|
||||
{
|
||||
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 = OsuFont.Torus.With(size: 15, weight: FontWeight.Regular),
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Colour = col,
|
||||
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
|
||||
Font = OsuFont.Torus.With(size: 50, weight: FontWeight.Light),
|
||||
Spacing = new Vector2(10, 0),
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Colour = col,
|
||||
Text = match.Date.Value.ToUniversalTime().ToString("dd MMMM HH:mm UTC"),
|
||||
Font = OsuFont.Torus.With(size: 20, weight: FontWeight.Light),
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private class TeamWithPlayers : CompositeDrawable
|
||||
{
|
||||
private readonly Color4 red = new Color4(129, 68, 65, 255);
|
||||
private readonly Color4 blue = new Color4(41, 91, 97, 255);
|
||||
|
||||
public TeamWithPlayers(TournamentTeam team, bool left = false)
|
||||
{
|
||||
var colour = left ? red : blue;
|
||||
FillFlowContainer players;
|
||||
|
||||
var colour = left ? TournamentGame.COLOUR_RED : TournamentGame.COLOUR_BLUE;
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new TeamDisplay(team, left ? "Team Red" : "Team Blue", colour)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
Direction = FillDirection.Vertical,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Spacing = new Vector2(0, 5),
|
||||
Padding = new MarginPadding(20),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativePositionAxes = Axes.Both,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
private class TeamDisplay : DrawableTournamentTeam
|
||||
{
|
||||
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
|
||||
new TournamentSpriteText
|
||||
{
|
||||
Text = team?.FullName.Value.ToUpper() ?? "???",
|
||||
Font = OsuFont.Torus.With(size: 40, weight: FontWeight.Light),
|
||||
Text = "WINNER",
|
||||
Font = OsuFont.Torus.With(size: 24, weight: FontWeight.SemiBold),
|
||||
Colour = Color4.Black,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
},
|
||||
new OsuSpriteText
|
||||
new TournamentSpriteText
|
||||
{
|
||||
Text = teamName.ToUpper(),
|
||||
Font = OsuFont.GetFont(size: 20),
|
||||
Colour = colour,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
}
|
||||
Text = team?.FullName.Value ?? "???",
|
||||
Font = OsuFont.Torus.With(size: 30, weight: FontWeight.SemiBold),
|
||||
Colour = Color4.Black,
|
||||
},
|
||||
players = new FillFlowContainer
|
||||
{
|
||||
Direction = FillDirection.Vertical,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Top = 10 },
|
||||
},
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
if (team != null)
|
||||
{
|
||||
foreach (var p in team.Players)
|
||||
{
|
||||
players.Add(new TournamentSpriteText
|
||||
{
|
||||
Text = p.Username,
|
||||
Font = OsuFont.Torus.With(size: 24),
|
||||
Colour = colour,
|
||||
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
|
||||
Origin = left ? Anchor.CentreRight : Anchor.CentreLeft,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class TeamFlagDisplay : DrawableTournamentTeam
|
||||
{
|
||||
public TeamFlagDisplay(TournamentTeam team)
|
||||
: base(team)
|
||||
{
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
Flag
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user