From 4e96c5aea25a91f72154322fcffefcb67d7658fc Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 23 Nov 2017 19:27:25 +0900 Subject: [PATCH] Fix TestCaseButtonSystem not working Was missing an osu! logo --- osu.Game.Tests/Visual/TestCaseButtonSystem.cs | 33 +++++++++++++++++++ .../Visual/TestCaseMenuButtonSystem.cs | 25 -------------- osu.Game.Tests/osu.Game.Tests.csproj | 2 +- 3 files changed, 34 insertions(+), 26 deletions(-) create mode 100644 osu.Game.Tests/Visual/TestCaseButtonSystem.cs delete mode 100644 osu.Game.Tests/Visual/TestCaseMenuButtonSystem.cs diff --git a/osu.Game.Tests/Visual/TestCaseButtonSystem.cs b/osu.Game.Tests/Visual/TestCaseButtonSystem.cs new file mode 100644 index 0000000000..d260de69f1 --- /dev/null +++ b/osu.Game.Tests/Visual/TestCaseButtonSystem.cs @@ -0,0 +1,33 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Graphics; +using osu.Framework.Graphics.Colour; +using osu.Framework.Graphics.Shapes; +using osu.Game.Screens.Menu; +using OpenTK.Graphics; + +namespace osu.Game.Tests.Visual +{ + internal class TestCaseButtonSystem : OsuTestCase + { + public TestCaseButtonSystem() + { + OsuLogo logo; + ButtonSystem buttons; + + Children = new Drawable[] + { + new Box + { + Colour = ColourInfo.GradientVertical(Color4.Gray, Color4.WhiteSmoke), + RelativeSizeAxes = Axes.Both, + }, + buttons = new ButtonSystem(), + logo = new OsuLogo() + }; + + buttons.SetOsuLogo(logo); + } + } +} diff --git a/osu.Game.Tests/Visual/TestCaseMenuButtonSystem.cs b/osu.Game.Tests/Visual/TestCaseMenuButtonSystem.cs deleted file mode 100644 index b5310f0fb0..0000000000 --- a/osu.Game.Tests/Visual/TestCaseMenuButtonSystem.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System.ComponentModel; -using osu.Framework.Graphics.Colour; -using osu.Framework.Graphics.Shapes; -using osu.Game.Screens.Menu; -using OpenTK.Graphics; - -namespace osu.Game.Tests.Visual -{ - [Description("main menu")] - internal class TestCaseMenuButtonSystem : OsuTestCase - { - public TestCaseMenuButtonSystem() - { - Add(new Box - { - Colour = ColourInfo.GradientVertical(Color4.Gray, Color4.WhiteSmoke), - RelativeSizeAxes = Framework.Graphics.Axes.Both, - }); - Add(new ButtonSystem()); - } - } -} diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj index 9bba09b1a7..312a564f71 100644 --- a/osu.Game.Tests/osu.Game.Tests.csproj +++ b/osu.Game.Tests/osu.Game.Tests.csproj @@ -116,7 +116,7 @@ - +