1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-06 09:47:22 +08:00
osu-lazer/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs

37 lines
1.0 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-02-17 18:59:30 +09:00
using osu.Framework.Screens.Testing;
2016-11-14 18:54:24 +09:00
using osu.Framework.Graphics;
using osu.Framework.Timing;
2016-11-14 18:54:24 +09:00
using osu.Game.Overlays;
2017-02-26 21:31:40 +01:00
using osu.Framework.Graphics.Containers;
2016-11-14 18:54:24 +09:00
namespace osu.Desktop.VisualTests.Tests
{
2017-03-07 10:59:19 +09:00
internal class TestCaseMusicController : TestCase
{
public override string Description => @"Tests music controller ui.";
2017-02-07 16:15:45 +09:00
private MusicController mc;
2016-10-24 18:26:50 +08:00
public TestCaseMusicController()
{
Clock = new FramedClock();
}
public override void Reset()
{
base.Reset();
Clock.ProcessFrame();
2016-10-24 18:26:50 +08:00
mc = new MusicController
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre
};
Add(mc);
2017-03-07 10:59:19 +09:00
AddToggle(@"Show", state => mc.State = state ? Visibility.Visible : Visibility.Hidden);
}
}
}