mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 02:03:51 +08:00
Initial pass of win screen design update
This commit is contained in:
parent
1c5d6e0cf4
commit
4d74493289
@ -10,7 +10,6 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Tournament.Components;
|
using osu.Game.Tournament.Components;
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
|
||||||
|
|
||||||
namespace osu.Game.Tournament.Screens.TeamWin
|
namespace osu.Game.Tournament.Screens.TeamWin
|
||||||
{
|
{
|
||||||
@ -73,105 +72,42 @@ namespace osu.Game.Tournament.Screens.TeamWin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool redWin = match.Winner == match.Team1.Value;
|
redWinVideo.Alpha = match.WinnerColour == TeamColour.Red ? 1 : 0;
|
||||||
redWinVideo.Alpha = redWin ? 1 : 0;
|
blueWinVideo.Alpha = match.WinnerColour == TeamColour.Blue ? 1 : 0;
|
||||||
blueWinVideo.Alpha = redWin ? 0 : 1;
|
|
||||||
|
|
||||||
mainContainer.Children = new Drawable[]
|
mainContainer.Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new TeamFlagDisplay(match.Winner)
|
new DrawableTeamFlag(match.Winner)
|
||||||
{
|
{
|
||||||
Size = new Vector2(300, 200),
|
Size = new Vector2(300, 200),
|
||||||
Scale = new Vector2(0.5f),
|
Scale = new Vector2(0.5f),
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
X = -387,
|
Position = new Vector2(-300, 10),
|
||||||
},
|
},
|
||||||
new TournamentSpriteText
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.TopLeft,
|
Origin = Anchor.Centre,
|
||||||
Position = new Vector2(78, -70),
|
X = 260,
|
||||||
Colour = OsuColour.Gray(0.33f),
|
Children = new Drawable[]
|
||||||
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
|
{
|
||||||
Font = OsuFont.Torus.With(size: 30, weight: FontWeight.Regular)
|
new RoundDisplay(match)
|
||||||
},
|
{
|
||||||
new TeamWithPlayers(match.Winner, redWin)
|
Margin = new MarginPadding { Bottom = 30 },
|
||||||
{
|
},
|
||||||
RelativeSizeAxes = Axes.Both,
|
new TournamentSpriteText
|
||||||
Width = 0.5f,
|
{
|
||||||
Height = 0.6f,
|
Text = "WINNER",
|
||||||
Anchor = Anchor.Centre,
|
Font = OsuFont.Torus.With(size: 100, weight: FontWeight.Bold),
|
||||||
Origin = Anchor.TopLeft,
|
Margin = new MarginPadding { Bottom = 50 },
|
||||||
Position = new Vector2(78, 0),
|
},
|
||||||
|
new DrawableTeamWithPlayers(match.Winner, match.WinnerColour)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TeamWithPlayers : CompositeDrawable
|
|
||||||
{
|
|
||||||
public TeamWithPlayers(TournamentTeam team, bool left = false)
|
|
||||||
{
|
|
||||||
FillFlowContainer players;
|
|
||||||
|
|
||||||
var colour = left ? TournamentGame.COLOUR_RED : TournamentGame.COLOUR_BLUE;
|
|
||||||
InternalChildren = new Drawable[]
|
|
||||||
{
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new TournamentSpriteText
|
|
||||||
{
|
|
||||||
Text = "WINNER",
|
|
||||||
Font = OsuFont.Torus.With(size: 24, weight: FontWeight.SemiBold),
|
|
||||||
Colour = Color4.Black,
|
|
||||||
},
|
|
||||||
new TournamentSpriteText
|
|
||||||
{
|
|
||||||
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
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user