1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 23:27:24 +08:00
osu-lazer/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs
Dean Herbert cc0f61f545 Merge branch 'refs/heads/master' into dependency-injection
# Conflicts:
#	osu-framework
#	osu.Game/GameModes/OsuGameMode.cs
#	osu.Game/GameModes/Play/Player.cs
#	osu.Game/OsuGame.cs
#	osu.Game/Overlays/MusicController.cs
#	osu.Game/Overlays/Options/EditorSection.cs
#	osu.Game/Overlays/Options/Input/MouseOptions.cs
#	osu.Game/Overlays/Options/Online/InGameChatOptions.cs
#	osu.Game/Overlays/Options/SkinSection.cs
2016-11-12 20:18:26 +09:00

54 lines
1.4 KiB
C#

//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.Allocation;
using osu.Framework.Graphics;
using osu.Framework.GameModes.Testing;
using osu.Game.Overlays;
using osu.Framework.Timing;
using osu.Framework;
namespace osu.Desktop.Tests
{
class TestCaseMusicController : TestCase
{
public override string Name => @"Music Controller";
public override string Description => @"Tests music controller ui.";
IFrameBasedClock ourClock;
protected override IFrameBasedClock Clock => ourClock;
protected MusicController mc;
[BackgroundDependencyLoader]
private void load()
{
ourClock = new FramedClock();
}
public override void Reset()
{
base.Reset();
ourClock.ProcessFrame();
mc = new MusicController
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre
};
Add(mc);
AddToggle(@"Show", mc.ToggleVisibility);
}
protected override void Update()
{
base.Update();
ourClock.ProcessFrame();
}
}
}