Add TestCase for main menu ButtonSystem.

This commit is contained in:
Dean Herbert 2016-09-28 15:30:06 +09:00
parent 27b96ab6c9
commit 7dcf2c6269
5 changed files with 26 additions and 18 deletions

View File

@ -0,0 +1,21 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.GameModes.Testing;
using osu.Game.GameModes.Menu;
namespace osu.Desktop.Tests
{
class TestCaseMenuButtonSystem : TestCase
{
public override string Name => @"ButtonSystem";
public override string Description => @"Main menu button system";
public override void Reset()
{
base.Reset();
Add(new ButtonSystem());
}
}
}

View File

@ -151,6 +151,7 @@
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Tests\TestCaseKeyCounter.cs" />
<Compile Include="Tests\TestCaseMenuButtonSystem.cs" />
<Compile Include="Tests\TestCaseTextAwesome.cs" />
<Compile Include="VisualTestGame.cs" />
</ItemGroup>

View File

@ -11,7 +11,6 @@
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transformations;
using osu.Framework.Input;
using osu.Framework.Threading;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using OpenTK;
@ -20,7 +19,7 @@
namespace osu.Game.GameModes.Menu
{
internal class ButtonSystem : OsuLargeComponent
public class ButtonSystem : OsuLargeComponent
{
private FlowContainerWithOrigin buttonFlow;
@ -291,7 +290,6 @@ public override void Load()
Sprite ripple;
Children = new Drawable[]
{
logoBounceContainer = new AutoSizeContainer

View File

@ -1,19 +1,12 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Graphics.Containers
{
class OsuComponent : AutoSizeContainer
{
public new OsuGame Game => base.Game as OsuGame;
public new OsuGameBase Game => base.Game as OsuGameBase;
}
}

View File

@ -1,17 +1,12 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Graphics.Containers
{
class OsuLargeComponent : LargeContainer
public class OsuLargeComponent : LargeContainer
{
public new OsuGame Game => base.Game as OsuGame;
public new OsuGameBase Game => base.Game as OsuGameBase;
}
}