2017-02-07 04:59:30 +00: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 02:22:38 +00:00
|
|
|
|
|
2017-03-28 12:03:34 +00:00
|
|
|
|
using osu.Framework.Testing;
|
2016-11-14 09:54:24 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
2016-10-24 10:18:54 +00:00
|
|
|
|
using osu.Framework.Timing;
|
2016-11-14 09:54:24 +00:00
|
|
|
|
using osu.Game.Overlays;
|
2017-02-26 20:31:40 +00:00
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2016-10-24 02:22:38 +00:00
|
|
|
|
|
2016-11-14 09:54:24 +00:00
|
|
|
|
namespace osu.Desktop.VisualTests.Tests
|
2016-10-24 02:22:38 +00:00
|
|
|
|
{
|
2017-03-07 01:59:19 +00:00
|
|
|
|
internal class TestCaseMusicController : TestCase
|
2016-10-24 02:22:38 +00:00
|
|
|
|
{
|
|
|
|
|
public override string Description => @"Tests music controller ui.";
|
|
|
|
|
|
2017-02-07 07:15:45 +00:00
|
|
|
|
private MusicController mc;
|
2016-10-24 10:26:50 +00:00
|
|
|
|
|
2016-11-12 17:34:36 +00:00
|
|
|
|
public TestCaseMusicController()
|
2016-10-24 10:18:54 +00:00
|
|
|
|
{
|
2016-11-20 11:16:54 +00:00
|
|
|
|
Clock = new FramedClock();
|
2016-10-24 10:18:54 +00:00
|
|
|
|
}
|
|
|
|
|
|
2016-10-24 02:22:38 +00:00
|
|
|
|
public override void Reset()
|
|
|
|
|
{
|
|
|
|
|
base.Reset();
|
2016-11-20 11:16:54 +00:00
|
|
|
|
Clock.ProcessFrame();
|
2016-10-24 10:26:50 +00:00
|
|
|
|
mc = new MusicController
|
2016-10-24 02:22:38 +00:00
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
Anchor = Anchor.Centre
|
|
|
|
|
};
|
|
|
|
|
Add(mc);
|
2017-04-07 04:04:57 +00:00
|
|
|
|
|
|
|
|
|
AddToggleStep(@"toggle visibility", state => mc.State = state ? Visibility.Visible : Visibility.Hidden);
|
|
|
|
|
AddStep(@"show", () => mc.State = Visibility.Visible);
|
2016-10-24 02:22:38 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|