further fixes, not perfect yet

This commit is contained in:
Albie 2019-12-11 07:02:51 +00:00
parent 12fb17572c
commit 83b2e0525e
2 changed files with 3 additions and 5 deletions

View File

@ -155,9 +155,7 @@ namespace osu.Game.Tests.Visual.Background
public void DisableUserDisplaySettingsTest()
{
performFullSetup();
AddStep("Enable user dim", () => player.DimmableStoryboard.EnableUserDim.Value = true);
waitForDim();
AddStep("Turn on IgnoreUserSettings", () => player.DimmableStoryboard.IgnoreUserSettings.Value = true);
AddStep("Start ignoring user settings", () => player.DimmableStoryboard.IgnoreUserSettings.Value = true);
waitForDim();
AddAssert("Check the background is undimmed", () => player.IsBackgroundUndimmed());
}
@ -367,7 +365,7 @@ namespace osu.Game.Tests.Visual.Background
public new DimmableStoryboard DimmableStoryboard => base.DimmableStoryboard;
public bool IsBackgroundUndimmed() => ((FadeAccessibleBackground)Background).CurrentColour == Color4.White;
public bool IsBackgroundUndimmed() => ((FadeAccessibleBackground)Background).CurrentColour == OsuColour.Gray(1);
// Whether or not the player should be allowed to load.
public bool BlockLoad;

View File

@ -91,7 +91,7 @@ namespace osu.Game.Graphics.Containers
ContentDisplayed = ShowDimContent;
dimContent.FadeTo(ContentDisplayed ? 1 : 0, BACKGROUND_FADE_DURATION, Easing.OutQuint);
dimContent.FadeColour(IgnoreUserSettings.Value ? OsuColour.Gray(1 - (float)DimLevel) : Color4.White, BACKGROUND_FADE_DURATION, Easing.OutQuint);
dimContent.FadeColour(IgnoreUserSettings.Value ? Color4.White : OsuColour.Gray(1 - (float)DimLevel), BACKGROUND_FADE_DURATION, Easing.OutQuint);
}
}
}