1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-09 05:37:25 +08:00
osu-lazer/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs
2017-07-08 18:17:47 +09:00

32 lines
983 B
C#

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Testing;
using osu.Framework.Graphics;
using osu.Framework.Timing;
using osu.Game.Overlays;
using osu.Framework.Graphics.Containers;
namespace osu.Desktop.VisualTests.Tests
{
internal class TestCaseMusicController : TestCase
{
public override string Description => @"Tests music controller ui.";
public TestCaseMusicController()
{
Clock = new FramedClock();
var mc = new MusicController
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre
};
Add(mc);
AddToggleStep(@"toggle visibility", state => mc.State = state ? Visibility.Visible : Visibility.Hidden);
AddStep(@"show", () => mc.State = Visibility.Visible);
}
}
}