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