2016-10-24 10:22:38 +08:00
|
|
|
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.GameModes.Testing;
|
|
|
|
|
using osu.Game.Overlays;
|
2016-10-24 18:18:54 +08:00
|
|
|
|
using osu.Framework.Timing;
|
|
|
|
|
using osu.Framework;
|
2016-10-24 10:22:38 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Desktop.Tests
|
|
|
|
|
{
|
|
|
|
|
class TestCaseMusicController : TestCase
|
|
|
|
|
{
|
|
|
|
|
public override string Name => @"Music Controller";
|
|
|
|
|
public override string Description => @"Tests music controller ui.";
|
|
|
|
|
|
2016-10-24 18:18:54 +08:00
|
|
|
|
IFrameBasedClock ourClock;
|
|
|
|
|
protected override IFrameBasedClock Clock => ourClock;
|
|
|
|
|
|
|
|
|
|
public override void Load(BaseGame game)
|
|
|
|
|
{
|
|
|
|
|
base.Load(game);
|
|
|
|
|
ourClock = new FramedClock();
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-24 10:22:38 +08:00
|
|
|
|
public override void Reset()
|
|
|
|
|
{
|
|
|
|
|
base.Reset();
|
2016-10-24 18:18:54 +08:00
|
|
|
|
ourClock.ProcessFrame();
|
2016-10-24 10:22:38 +08:00
|
|
|
|
MusicController mc = new MusicController
|
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
Anchor = Anchor.Centre
|
|
|
|
|
};
|
|
|
|
|
Add(mc);
|
|
|
|
|
AddToggle(@"Show", mc.ToggleVisibility);
|
|
|
|
|
}
|
2016-10-24 18:18:54 +08:00
|
|
|
|
|
|
|
|
|
protected override void Update()
|
|
|
|
|
{
|
|
|
|
|
base.Update();
|
|
|
|
|
ourClock.ProcessFrame();
|
|
|
|
|
}
|
2016-10-24 10:22:38 +08:00
|
|
|
|
}
|
|
|
|
|
}
|