1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +08:00
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneBackButton.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.5 KiB
C#
Raw Normal View History

2019-06-25 17:30:43 +08:00
// 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 osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.UserInterface;
2024-05-16 12:20:55 +08:00
using osu.Game.Screens.Footer;
2019-06-25 17:30:43 +08:00
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual.UserInterface
{
public partial class TestSceneBackButton : OsuTestScene
{
2019-06-25 19:23:43 +08:00
public TestSceneBackButton()
{
2019-07-08 15:34:11 +08:00
BackButton button;
2024-05-16 12:20:55 +08:00
ScreenFooter.BackReceptor receptor = new ScreenFooter.BackReceptor();
2019-07-08 15:34:11 +08:00
2019-06-25 17:30:43 +08:00
Child = new Container
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(300),
Masking = true,
Children = new Drawable[]
{
2019-07-29 17:45:16 +08:00
receptor,
2019-06-25 17:30:43 +08:00
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.SlateGray
},
2019-07-29 17:45:16 +08:00
button = new BackButton(receptor)
2019-06-25 17:30:43 +08:00
{
Anchor = Anchor.BottomLeft,
2019-06-25 19:23:43 +08:00
Origin = Anchor.BottomLeft,
2019-06-25 17:30:43 +08:00
}
}
};
2019-07-08 15:34:11 +08:00
button.Action = () => button.Hide();
2019-06-25 17:30:43 +08:00
AddStep("show button", () => button.Show());
AddStep("hide button", () => button.Hide());
}
}
}