Preview visual settings at the “loading” screen

This commit is contained in:
TocoToucan 2018-02-09 00:06:24 +03:00
parent d437c1d7ec
commit a860dd7208
3 changed files with 14 additions and 6 deletions

View File

@ -262,10 +262,7 @@ namespace osu.Game.Screens.Play
if (!loadedSuccessfully)
return;
DimLevel.ValueChanged += _ => UpdateBackgroundElements();
BlurLevel.ValueChanged += _ => UpdateBackgroundElements();
ShowStoryboard.ValueChanged += _ => UpdateBackgroundElements();
UpdateBackgroundElements();
ConfigureBackgroundUpdate();
Content.Alpha = 0;
Content

View File

@ -46,6 +46,14 @@ namespace osu.Game.Screens.Play
UserAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
}
protected void ConfigureBackgroundUpdate()
{
DimLevel.ValueChanged += _ => UpdateBackgroundElements();
BlurLevel.ValueChanged += _ => UpdateBackgroundElements();
ShowStoryboard.ValueChanged += _ => UpdateBackgroundElements();
UpdateBackgroundElements();
}
protected void UpdateBackgroundElements()
{
if (!IsCurrentScreen) return;
@ -60,7 +68,7 @@ namespace osu.Game.Screens.Play
var beatmap = Beatmap.Value;
var storyboardVisible = ShowStoryboard && beatmap.Storyboard.HasDrawable;
StoryboardContainer
StoryboardContainer?
.FadeColour(OsuColour.Gray(opacity), duration, Easing.OutQuint)
.FadeTo(storyboardVisible && opacity > 0 ? 1 : 0, duration, Easing.OutQuint);
@ -70,6 +78,9 @@ namespace osu.Game.Screens.Play
protected void InitializeStoryboard(bool asyncLoad)
{
if (StoryboardContainer == null)
return;
var beatmap = Beatmap.Value;
Storyboard = beatmap.Storyboard.CreateDrawable(Beatmap.Value);

View File

@ -88,7 +88,7 @@ namespace osu.Game.Screens.Play
{
base.OnEntering(last);
Background.FadeTo(0.4f, 250);
ConfigureBackgroundUpdate();
Content.ScaleTo(0.7f);