1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 16:32:54 +08:00

Fix backgrounds being transparent in some scaling modes

by replacing `.FadeTo` at the necessary places with `.FadeColour`.
restoring the `.FadeColour` in `fadeOut` of the Player Screen which is ran in every exit scenario.
This commit is contained in:
chrisny286 2019-01-23 08:52:25 +01:00
parent e54771c817
commit f4ebab2d3a
2 changed files with 4 additions and 2 deletions

View File

@ -401,6 +401,7 @@ namespace osu.Game.Screens.Play
{
float fadeOutDuration = instant ? 0 : 250;
Content.FadeOut(fadeOutDuration);
Background?.FadeColour(OsuColour.Gray(1f), fadeOutDuration, Easing.OutQuint);
}
protected override bool OnScroll(ScrollEvent e) => mouseWheelDisabled.Value && !pauseContainer.IsPaused;
@ -438,7 +439,7 @@ namespace osu.Game.Screens.Play
.FadeTo(storyboardVisible && BackgroundOpacity > 0 ? 1 : 0, BACKGROUND_FADE_DURATION, Easing.OutQuint);
if (storyboardVisible && beatmap.Storyboard.ReplacesBackground)
Background?.FadeTo(0, BACKGROUND_FADE_DURATION, Easing.OutQuint);
Background?.FadeColour(OsuColour.Gray(0f), BACKGROUND_FADE_DURATION, Easing.OutQuint);
}
protected virtual Results CreateResults(ScoreInfo score) => new SoloResults(score);

View File

@ -6,6 +6,7 @@ using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Screens;
using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Screens.Backgrounds;
using osuTK;
@ -67,7 +68,7 @@ namespace osu.Game.Screens.Play
{
if (!IsCurrentScreen) return;
Background?.FadeTo(BackgroundOpacity, BACKGROUND_FADE_DURATION, Easing.OutQuint);
Background?.FadeColour(OsuColour.Gray(BackgroundOpacity), BACKGROUND_FADE_DURATION, Easing.OutQuint);
Background?.BlurTo(new Vector2((float)BlurLevel.Value * 25), BACKGROUND_FADE_DURATION, Easing.OutQuint);
}
}