Replace ConfigureBackgroundUpdate with OnEntering

This commit is contained in:
TocoToucan
2018-03-08 11:35:00 +03:00
parent 8f3f886805
commit 2cb197d0c4
3 changed files with 3 additions and 5 deletions

View File

@ -277,8 +277,6 @@ namespace osu.Game.Screens.Play
if (!loadedSuccessfully) if (!loadedSuccessfully)
return; return;
ConfigureBackgroundUpdate();
Content.Alpha = 0; Content.Alpha = 0;
Content Content
.ScaleTo(0.7f) .ScaleTo(0.7f)

View File

@ -88,8 +88,6 @@ namespace osu.Game.Screens.Play
{ {
base.OnEntering(last); base.OnEntering(last);
ConfigureBackgroundUpdate();
Content.ScaleTo(0.7f); Content.ScaleTo(0.7f);
contentIn(); contentIn();

View File

@ -4,6 +4,7 @@
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Screens;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.Screens.Backgrounds; using osu.Game.Screens.Backgrounds;
using OpenTK; using OpenTK;
@ -42,8 +43,9 @@ namespace osu.Game.Screens.Play
UserAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset); UserAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
} }
protected void ConfigureBackgroundUpdate() protected override void OnEntering(Screen last)
{ {
base.OnEntering(last);
DimLevel.ValueChanged += _ => UpdateBackgroundElements(); DimLevel.ValueChanged += _ => UpdateBackgroundElements();
BlurLevel.ValueChanged += _ => UpdateBackgroundElements(); BlurLevel.ValueChanged += _ => UpdateBackgroundElements();
ShowStoryboard.ValueChanged += _ => UpdateBackgroundElements(); ShowStoryboard.ValueChanged += _ => UpdateBackgroundElements();