1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +08:00

Merge branch 'master' into fix-key-counter

This commit is contained in:
Dean Herbert 2019-01-23 18:22:08 +09:00 committed by GitHub
commit 1730ad143f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -32,6 +32,7 @@ using osu.Game.Scoring;
using osu.Game.Screens.Ranking; using osu.Game.Screens.Ranking;
using osu.Game.Skinning; using osu.Game.Skinning;
using osu.Game.Storyboards.Drawables; using osu.Game.Storyboards.Drawables;
using osuTK.Graphics;
namespace osu.Game.Screens.Play namespace osu.Game.Screens.Play
{ {
@ -401,6 +402,7 @@ namespace osu.Game.Screens.Play
{ {
float fadeOutDuration = instant ? 0 : 250; float fadeOutDuration = instant ? 0 : 250;
Content.FadeOut(fadeOutDuration); Content.FadeOut(fadeOutDuration);
Background?.FadeColour(Color4.White, fadeOutDuration, Easing.OutQuint);
} }
protected override bool OnScroll(ScrollEvent e) => mouseWheelDisabled.Value && !pauseContainer.IsPaused; protected override bool OnScroll(ScrollEvent e) => mouseWheelDisabled.Value && !pauseContainer.IsPaused;
@ -438,7 +440,7 @@ namespace osu.Game.Screens.Play
.FadeTo(storyboardVisible && BackgroundOpacity > 0 ? 1 : 0, BACKGROUND_FADE_DURATION, Easing.OutQuint); .FadeTo(storyboardVisible && BackgroundOpacity > 0 ? 1 : 0, BACKGROUND_FADE_DURATION, Easing.OutQuint);
if (storyboardVisible && beatmap.Storyboard.ReplacesBackground) if (storyboardVisible && beatmap.Storyboard.ReplacesBackground)
Background?.FadeTo(0, BACKGROUND_FADE_DURATION, Easing.OutQuint); Background?.FadeColour(Color4.Black, BACKGROUND_FADE_DURATION, Easing.OutQuint);
} }
protected virtual Results CreateResults(ScoreInfo score) => new SoloResults(score); protected virtual Results CreateResults(ScoreInfo score) => new SoloResults(score);

View File

@ -164,7 +164,7 @@ namespace osu.Game.Screens.Play
protected override void InitializeBackgroundElements() protected override void InitializeBackgroundElements()
{ {
Background?.FadeTo(1, BACKGROUND_FADE_DURATION, Easing.OutQuint); Background?.FadeColour(Color4.White, BACKGROUND_FADE_DURATION, Easing.OutQuint);
Background?.BlurTo(background_blur, BACKGROUND_FADE_DURATION, Easing.OutQuint); Background?.BlurTo(background_blur, BACKGROUND_FADE_DURATION, Easing.OutQuint);
} }

View File

@ -6,6 +6,7 @@ using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Screens.Backgrounds; using osu.Game.Screens.Backgrounds;
using osuTK; using osuTK;
@ -60,14 +61,14 @@ namespace osu.Game.Screens.Play
protected virtual void InitializeBackgroundElements() => UpdateBackgroundElements(); protected virtual void InitializeBackgroundElements() => UpdateBackgroundElements();
/// <summary> /// <summary>
/// Called wen background elements require updates, usually due to a user changing a setting. /// Called when background elements require updates, usually due to a user changing a setting.
/// </summary> /// </summary>
/// <param name="userChange"></param> /// <param name="userChange"></param>
protected virtual void UpdateBackgroundElements() protected virtual void UpdateBackgroundElements()
{ {
if (!IsCurrentScreen) return; 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); Background?.BlurTo(new Vector2((float)BlurLevel.Value * 25), BACKGROUND_FADE_DURATION, Easing.OutQuint);
} }
} }