mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Convert remaining two flags to ctor parameters
This commit is contained in:
@ -257,9 +257,8 @@ namespace osu.Game.Tests.Visual.Background
|
||||
|
||||
AddStep("Start player loader", () =>
|
||||
{
|
||||
songSelect.Push(playerLoader = new TestPlayerLoader(player = new TestPlayer
|
||||
songSelect.Push(playerLoader = new TestPlayerLoader(player = new TestPlayer(allowPause)
|
||||
{
|
||||
AllowPause = allowPause,
|
||||
Ready = true,
|
||||
}));
|
||||
});
|
||||
@ -357,6 +356,11 @@ namespace osu.Game.Tests.Visual.Background
|
||||
public readonly Bindable<bool> ReplacesBackground = new Bindable<bool>();
|
||||
public readonly Bindable<bool> IsPaused = new Bindable<bool>();
|
||||
|
||||
public TestPlayer(bool allowPause = true)
|
||||
: base(allowPause)
|
||||
{
|
||||
}
|
||||
|
||||
public bool IsStoryboardVisible() => ((TestUserDimContainer)CurrentStoryboardContainer).CurrentAlpha == 1;
|
||||
|
||||
public bool IsStoryboardInvisible() => ((TestUserDimContainer)CurrentStoryboardContainer).CurrentAlpha <= 1;
|
||||
|
@ -15,11 +15,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
protected override Player CreatePlayer(Ruleset ruleset)
|
||||
{
|
||||
Beatmap.Value.Mods.Value = Beatmap.Value.Mods.Value.Concat(new[] { ruleset.GetAutoplayMod() });
|
||||
return new ScoreAccessiblePlayer
|
||||
{
|
||||
AllowPause = false,
|
||||
AllowResults = false,
|
||||
};
|
||||
return new ScoreAccessiblePlayer();
|
||||
}
|
||||
|
||||
protected override void AddCheckSteps()
|
||||
@ -32,6 +28,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
public new ScoreProcessor ScoreProcessor => base.ScoreProcessor;
|
||||
public new HUDOverlay HUDOverlay => base.HUDOverlay;
|
||||
|
||||
public ScoreAccessiblePlayer()
|
||||
: base(false, false)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,11 +26,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
Beatmap.Value = new DummyWorkingBeatmap(game);
|
||||
|
||||
AddStep("load dummy beatmap", () => stack.Push(loader = new PlayerLoader(() => new Player
|
||||
{
|
||||
AllowPause = false,
|
||||
AllowResults = false,
|
||||
})));
|
||||
AddStep("load dummy beatmap", () => stack.Push(loader = new PlayerLoader(() => new Player(false, false))));
|
||||
|
||||
AddUntilStep("wait for current", () => loader.IsCurrentScreen());
|
||||
|
||||
@ -46,11 +42,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
SlowLoadPlayer slow = null;
|
||||
|
||||
stack.Push(loader = new PlayerLoader(() => slow = new SlowLoadPlayer
|
||||
{
|
||||
AllowPause = false,
|
||||
AllowResults = false,
|
||||
}));
|
||||
stack.Push(loader = new PlayerLoader(() => slow = new SlowLoadPlayer(false, false)));
|
||||
|
||||
Scheduler.AddDelayed(() => slow.Ready = true, 5000);
|
||||
});
|
||||
@ -62,6 +54,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
public bool Ready;
|
||||
|
||||
public SlowLoadPlayer(bool allowPause = true, bool showResults = true)
|
||||
: base(allowPause, showResults)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
|
Reference in New Issue
Block a user