mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
further fixes, not perfect yet
This commit is contained in:
parent
12fb17572c
commit
83b2e0525e
@ -155,9 +155,7 @@ namespace osu.Game.Tests.Visual.Background
|
|||||||
public void DisableUserDisplaySettingsTest()
|
public void DisableUserDisplaySettingsTest()
|
||||||
{
|
{
|
||||||
performFullSetup();
|
performFullSetup();
|
||||||
AddStep("Enable user dim", () => player.DimmableStoryboard.EnableUserDim.Value = true);
|
AddStep("Start ignoring user settings", () => player.DimmableStoryboard.IgnoreUserSettings.Value = true);
|
||||||
waitForDim();
|
|
||||||
AddStep("Turn on IgnoreUserSettings", () => player.DimmableStoryboard.IgnoreUserSettings.Value = true);
|
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Check the background is undimmed", () => player.IsBackgroundUndimmed());
|
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 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.
|
// Whether or not the player should be allowed to load.
|
||||||
public bool BlockLoad;
|
public bool BlockLoad;
|
||||||
|
@ -91,7 +91,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
ContentDisplayed = ShowDimContent;
|
ContentDisplayed = ShowDimContent;
|
||||||
|
|
||||||
dimContent.FadeTo(ContentDisplayed ? 1 : 0, BACKGROUND_FADE_DURATION, Easing.OutQuint);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user