Actually implement blurring fix

This commit is contained in:
David Zhao
2019-02-28 16:51:17 +09:00
parent dbe5887f7e
commit 69b1c76dce
5 changed files with 21 additions and 11 deletions

View File

@ -162,6 +162,7 @@ namespace osu.Game.Tests.Visual
AddUntilStep(() => AddUntilStep(() =>
{ {
if (songSelect.IsCurrentScreen()) return true; if (songSelect.IsCurrentScreen()) return true;
songSelect.MakeCurrent(); songSelect.MakeCurrent();
return false; return false;
}, "Wait for song select is current"); }, "Wait for song select is current");
@ -264,13 +265,16 @@ namespace osu.Game.Tests.Visual
{ {
createSongSelect(); createSongSelect();
AddStep("Start player loader", () => { songSelect.Push(playerLoader = new DimAccessiblePlayerLoader(player = new DimAccessiblePlayer AddStep("Start player loader", () =>
{
songSelect.Push(playerLoader = new DimAccessiblePlayerLoader(player = new DimAccessiblePlayer
{ {
AllowLeadIn = false, AllowLeadIn = false,
AllowResults = false, AllowResults = false,
AllowPause = allowPause, AllowPause = allowPause,
Ready = true, Ready = true,
})); }); }));
});
AddUntilStep(() => playerLoader.IsLoaded, "Wait for Player Loader to load"); AddUntilStep(() => playerLoader.IsLoaded, "Wait for Player Loader to load");
AddStep("Move mouse to center of screen", () => InputManager.MoveMouseTo(playerLoader.ScreenPos)); AddStep("Move mouse to center of screen", () => InputManager.MoveMouseTo(playerLoader.ScreenPos));
AddUntilStep(() => player.IsLoaded, "Wait for player to load"); AddUntilStep(() => player.IsLoaded, "Wait for player to load");
@ -355,6 +359,7 @@ namespace osu.Game.Tests.Visual
} }
public UserDimContainer CurrentStoryboardContainer => StoryboardContainer; public UserDimContainer CurrentStoryboardContainer => StoryboardContainer;
// Whether or not the player should be allowed to load. // Whether or not the player should be allowed to load.
public bool Ready; public bool Ready;
@ -430,6 +435,7 @@ namespace osu.Game.Tests.Visual
: base(isStoryboard) : base(isStoryboard)
{ {
} }
public Color4 CurrentColour => DimContainer.Colour; public Color4 CurrentColour => DimContainer.Colour;
public float CurrentAlpha => DimContainer.Alpha; public float CurrentAlpha => DimContainer.Alpha;
} }

View File

@ -48,6 +48,7 @@ namespace osu.Game.Screens.Backgrounds
Background.FadeOut(250); Background.FadeOut(250);
Background.Expire(); Background.Expire();
} }
b.Depth = newDepth; b.Depth = newDepth;
FadeContainer.Add(Background = b); FadeContainer.Add(Background = b);
Background.BlurSigma = BlurTarget; Background.BlurSigma = BlurTarget;

View File

@ -158,9 +158,12 @@ namespace osu.Game.Screens.Play
protected override bool OnHover(HoverEvent e) protected override bool OnHover(HoverEvent e)
{ {
// restore our screen defaults // restore our screen defaults
InitializeBackgroundElements();
if (this.IsCurrentScreen()) if (this.IsCurrentScreen())
{
InitializeBackgroundElements();
Background.EnableUserDim.Value = false; Background.EnableUserDim.Value = false;
}
return base.OnHover(e); return base.OnHover(e);
} }