From a918e83b1e4b1523c48b4d54cdb1a81eb88b6982 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 4 Nov 2018 04:58:59 +0900 Subject: [PATCH] Add drawings screen --- osu.Game.Tournament.Tests/TestCaseSceneManager.cs | 15 +++++++++++---- .../Screens/Ladder/Components/ProgressionPath.cs | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/osu.Game.Tournament.Tests/TestCaseSceneManager.cs b/osu.Game.Tournament.Tests/TestCaseSceneManager.cs index a1434b3a31..9454a5674c 100644 --- a/osu.Game.Tournament.Tests/TestCaseSceneManager.cs +++ b/osu.Game.Tournament.Tests/TestCaseSceneManager.cs @@ -8,6 +8,7 @@ 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.Drawings; using osu.Game.Tournament.Screens.Ladder; using osu.Game.Tournament.Screens.TeamIntro; using OpenTK; @@ -20,6 +21,7 @@ namespace osu.Game.Tournament.Tests private LadderManager bracket; private MapPoolScreen mapPool; private TeamIntroScreen teamIntro; + private DrawingsScreen drawings; private Container screens; [BackgroundDependencyLoader] @@ -44,6 +46,7 @@ namespace osu.Game.Tournament.Tests Direction = FillDirection.Vertical, Children = new Drawable[] { + new OsuButton { RelativeSizeAxes = Axes.X, Text = "Drawings", Action = () => setScreen(drawings) }, new OsuButton { RelativeSizeAxes = Axes.X, Text = "TeamIntro", Action = () => setScreen(teamIntro) }, new OsuButton { RelativeSizeAxes = Axes.X, Text = "MapPool", Action = () => setScreen(mapPool) }, new OsuButton { RelativeSizeAxes = Axes.X, Text = "Bracket", Action = () => setScreen(bracket) }, @@ -54,16 +57,19 @@ namespace osu.Game.Tournament.Tests new Container { RelativeSizeAxes = Axes.Both, + RelativePositionAxes = Axes.Both, + X = 0.2f, FillMode = FillMode.Fit, FillAspectRatio = 16/9f, - Anchor = Anchor.TopRight, - Origin = Anchor.TopRight, + Anchor = Anchor.TopLeft, + Origin = Anchor.TopLeft, Size = new Vector2(0.8f, 1), - Masking = true, + //Masking = true, Children = new Drawable[] { new VideoSprite(@"C:\Users\Dean\BG Side Logo - OWC.m4v") { + Loop = true, RelativeSizeAxes = Axes.Both, FillMode = FillMode.Fit, }, @@ -75,7 +81,8 @@ namespace osu.Game.Tournament.Tests 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")) + Ladder.Groupings.First(g => g.Name == "Finals")), + drawings = new DrawingsScreen() } }, } diff --git a/osu.Game.Tournament/Screens/Ladder/Components/ProgressionPath.cs b/osu.Game.Tournament/Screens/Ladder/Components/ProgressionPath.cs index 4496430e79..880b2fefa4 100644 --- a/osu.Game.Tournament/Screens/Ladder/Components/ProgressionPath.cs +++ b/osu.Game.Tournament/Screens/Ladder/Components/ProgressionPath.cs @@ -56,7 +56,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components var p3 = new Vector2(p2.X, c2.Y); var p4 = new Vector2(c2.X, p3.Y); - Positions = new[] { p1, p2, p3, p4 }.Select(ToLocalSpace).ToList(); + Vertices = new[] { p1, p2, p3, p4 }.Select(ToLocalSpace).ToList(); } } }