update tests, change binding and reduce lines in cinema mod

This commit is contained in:
Albie
2019-12-11 17:39:40 +00:00
parent 83b2e0525e
commit caa9286a90
3 changed files with 22 additions and 9 deletions

View File

@ -155,9 +155,18 @@ namespace osu.Game.Tests.Visual.Background
public void DisableUserDisplaySettingsTest()
{
performFullSetup();
AddStep("Start ignoring user settings", () => player.DimmableStoryboard.IgnoreUserSettings.Value = true);
createFakeStoryboard();
AddStep("Enable Storyboard", () =>
{
player.ReplacesBackground.Value = true;
player.StoryboardEnabled.Value = true;
});
AddStep("Enable user dim", () => player.DimmableStoryboard.EnableUserDim.Value = true);
AddStep("Set dim level to 1", () => songSelect.DimLevel.Value = 1f);
waitForDim();
AddAssert("Check the background is undimmed", () => player.IsBackgroundUndimmed());
AddAssert("Ignore User Settings", () => player.DimmableStoryboard.IgnoreUserSettings.Value = true);
waitForDim();
AddAssert("User dim settings ignored", () => !player.DimmableStoryboard.EnableUserDim.Value && player.DimmableStoryboard.DimLevel == 0);
}
/// <summary>
@ -365,8 +374,6 @@ namespace osu.Game.Tests.Visual.Background
public new DimmableStoryboard DimmableStoryboard => base.DimmableStoryboard;
public bool IsBackgroundUndimmed() => ((FadeAccessibleBackground)Background).CurrentColour == OsuColour.Gray(1);
// Whether or not the player should be allowed to load.
public bool BlockLoad;