From 12c0b2c37d208b17e3787af4936da18178e6fe17 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 18 Oct 2018 02:18:09 +0900 Subject: [PATCH] Add test videos and adjust alignment to match --- .../TestCaseSceneManager.cs | 14 ++++++++++---- osu.Game.Tournament.Tests/TestCaseTeamIntro.cs | 7 ++++++- .../Screens/TeamIntro/TeamIntro.cs | 16 ++++++++-------- osu.Game/osu.Game.csproj | 2 +- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/osu.Game.Tournament.Tests/TestCaseSceneManager.cs b/osu.Game.Tournament.Tests/TestCaseSceneManager.cs index 8a56ec883e..a1434b3a31 100644 --- a/osu.Game.Tournament.Tests/TestCaseSceneManager.cs +++ b/osu.Game.Tournament.Tests/TestCaseSceneManager.cs @@ -6,6 +6,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Framework.Graphics.Video; using osu.Game.Graphics.UserInterface; using osu.Game.Tournament.Screens.Ladder; using osu.Game.Tournament.Screens.TeamIntro; @@ -53,16 +54,18 @@ private void load() new Container { RelativeSizeAxes = Axes.Both, + FillMode = FillMode.Fit, + FillAspectRatio = 16/9f, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, - Size = new Vector2(0.8f), + Size = new Vector2(0.8f, 1), Masking = true, Children = new Drawable[] { - new Box + new VideoSprite(@"C:\Users\Dean\BG Side Logo - OWC.m4v") { - Colour = Color4.White, RelativeSizeAxes = Axes.Both, + FillMode = FillMode.Fit, }, screens = new Container { @@ -71,12 +74,15 @@ private void load() { bracket = new LadderManager(Ladder), mapPool = new MapPoolScreen(Ladder.Groupings.First(g => g.Name == "Finals")), - teamIntro = new TeamIntroScreen(Ladder.Teams.First(t => t.Acronym == "USA"), Ladder.Teams.First(t => t.Acronym == "JPN"), Ladder.Groupings.First(g => g.Name == "Finals")) + teamIntro = new TeamIntroScreen(Ladder.Teams.First(t => t.Acronym == "USA"), Ladder.Teams.First(t => t.Acronym == "JPN"), + Ladder.Groupings.First(g => g.Name == "Finals")) } }, } }, }; + + setScreen(teamIntro); } private void setScreen(Drawable screen) diff --git a/osu.Game.Tournament.Tests/TestCaseTeamIntro.cs b/osu.Game.Tournament.Tests/TestCaseTeamIntro.cs index 52a5a7204c..fff28ba900 100644 --- a/osu.Game.Tournament.Tests/TestCaseTeamIntro.cs +++ b/osu.Game.Tournament.Tests/TestCaseTeamIntro.cs @@ -3,6 +3,7 @@ using System.Linq; using osu.Framework.Allocation; +using osu.Framework.Graphics; using osu.Game.Tournament.Screens.TeamIntro; namespace osu.Game.Tournament.Tests @@ -17,7 +18,11 @@ private void load() var round = Ladder.Groupings.First(g => g.Name == "Finals"); - Add(new TeamIntroScreen(team1, team2, round)); + Add(new TeamIntroScreen(team1, team2, round) + { + FillMode = FillMode.Fit, + FillAspectRatio = 16 / 9f + }); } } } diff --git a/osu.Game.Tournament/Screens/TeamIntro/TeamIntro.cs b/osu.Game.Tournament/Screens/TeamIntro/TeamIntro.cs index fce29a2c89..f8820d570a 100644 --- a/osu.Game.Tournament/Screens/TeamIntro/TeamIntro.cs +++ b/osu.Game.Tournament/Screens/TeamIntro/TeamIntro.cs @@ -3,7 +3,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Shapes; +using osu.Framework.Graphics.Video; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Screens; @@ -22,15 +22,14 @@ public TeamIntroScreen(TournamentTeam team1, TournamentTeam team2, TournamentGro InternalChildren = new Drawable[] { - new Box + new VideoSprite(@"C:\Users\Dean\BG Team - Both OWC.m4v") { - Colour = Color4.White, - RelativeSizeAxes = Axes.Both + RelativeSizeAxes = Axes.Both, + Loop = true, }, new TeamWithPlayers(team1, true) { RelativeSizeAxes = Axes.Both, - Margin = new MarginPadding(40), Width = 0.5f, Height = 0.6f, Anchor = Anchor.Centre, @@ -39,7 +38,6 @@ public TeamIntroScreen(TournamentTeam team1, TournamentTeam team2, TournamentGro new TeamWithPlayers(team2) { RelativeSizeAxes = Axes.Both, - Margin = new MarginPadding(40), Width = 0.5f, Height = 0.6f, Anchor = Anchor.Centre, @@ -48,7 +46,7 @@ public TeamIntroScreen(TournamentTeam team1, TournamentTeam team2, TournamentGro new RoundDisplay(round) { RelativeSizeAxes = Axes.Both, - Height = 0.3f, + Height = 0.25f, Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, } @@ -119,7 +117,9 @@ public TeamWithPlayers(TournamentTeam team, bool left = false) new TeamDisplay(team, left ? "Team Red" : "Team Blue", colour) { Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft, - Origin = left ? Anchor.CentreRight : Anchor.CentreLeft, + Origin = Anchor.Centre, + RelativePositionAxes = Axes.Both, + X = (left ? -1 : 1) * 0.36f, }, players = new FillFlowContainer { diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index cc21f4f6a4..cf1863a58c 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -18,7 +18,7 @@ - +