mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 00:47:20 +08:00
Added beatmap lock functionallity to the music controller's test case
This commit is contained in:
parent
c0fd4a765e
commit
b01a6d46c9
@ -4,7 +4,11 @@
|
|||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
|
using osu.Game;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
@ -13,6 +17,8 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
public override string Description => @"Tests music controller ui.";
|
public override string Description => @"Tests music controller ui.";
|
||||||
|
|
||||||
|
private readonly Bindable<WorkingBeatmap> beatmapBacking = new Bindable<WorkingBeatmap>();
|
||||||
|
|
||||||
public TestCaseMusicController()
|
public TestCaseMusicController()
|
||||||
{
|
{
|
||||||
Clock = new FramedClock();
|
Clock = new FramedClock();
|
||||||
@ -26,6 +32,13 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
AddToggleStep(@"toggle visibility", state => mc.State = state ? Visibility.Visible : Visibility.Hidden);
|
AddToggleStep(@"toggle visibility", state => mc.State = state ? Visibility.Visible : Visibility.Hidden);
|
||||||
AddStep(@"show", () => mc.State = Visibility.Visible);
|
AddStep(@"show", () => mc.State = Visibility.Visible);
|
||||||
|
AddToggleStep(@"toggle beatmap lock", state => beatmapBacking.Disabled = state);
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuGameBase game)
|
||||||
|
{
|
||||||
|
beatmapBacking.BindTo(game.Beatmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user