From 21c6f66017b6ba1994d7cb1ea42197cc0cf8e35b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 18:30:10 +0900 Subject: [PATCH] Fix TestCaseGamefield. --- .../Tests/TestCaseGamefield.cs | 65 ++++++++++--------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs index 9259f2ea78..dd957ee5a0 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using osu.Framework.Screens.Testing; using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; using osu.Framework.MathUtils; using osu.Framework.Timing; using osu.Game.Beatmaps; @@ -27,9 +28,6 @@ namespace osu.Desktop.VisualTests.Tests { base.Reset(); - //ensure we are at offset 0 - Clock = new FramedClock(); - List objects = new List(); int time = 500; @@ -52,33 +50,42 @@ namespace osu.Desktop.VisualTests.Tests Add(new Drawable[] { - new OsuHitRenderer + new Container { - Beatmap = beatmap, - Scale = new Vector2(0.5f), - Anchor = Anchor.TopLeft, - Origin = Anchor.TopLeft - }, - new TaikoHitRenderer - { - Beatmap = beatmap, - Scale = new Vector2(0.5f), - Anchor = Anchor.TopRight, - Origin = Anchor.TopRight - }, - new CatchHitRenderer - { - Beatmap = beatmap, - Scale = new Vector2(0.5f), - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft - }, - new ManiaHitRenderer - { - Beatmap = beatmap, - Scale = new Vector2(0.5f), - Anchor = Anchor.BottomRight, - Origin = Anchor.BottomRight + RelativeSizeAxes = Axes.Both, + //ensure we are at offset 0 + Clock = new FramedClock(), + Children = new Drawable[] + { + new OsuHitRenderer + { + Beatmap = beatmap, + Scale = new Vector2(0.5f), + Anchor = Anchor.TopLeft, + Origin = Anchor.TopLeft + }, + new TaikoHitRenderer + { + Beatmap = beatmap, + Scale = new Vector2(0.5f), + Anchor = Anchor.TopRight, + Origin = Anchor.TopRight + }, + new CatchHitRenderer + { + Beatmap = beatmap, + Scale = new Vector2(0.5f), + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft + }, + new ManiaHitRenderer + { + Beatmap = beatmap, + Scale = new Vector2(0.5f), + Anchor = Anchor.BottomRight, + Origin = Anchor.BottomRight + } + } } }); }