Add testability of dismissal

This commit is contained in:
Dean Herbert 2019-06-25 20:23:43 +09:00
parent f51be4c4fe
commit e87e4077e8
1 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,8 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
@ -12,10 +14,15 @@ namespace osu.Game.Tests.Visual.UserInterface
{
public class TestSceneBackButton : OsuTestScene
{
private readonly BackButton button;
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(TwoLayerButton)
};
public TestSceneBackButton()
{
BackButton button;
Child = new Container
{
Anchor = Anchor.Centre,
@ -32,7 +39,8 @@ public TestSceneBackButton()
button = new BackButton
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft
Origin = Anchor.BottomLeft,
Action = () => button.Hide(),
}
}
};