mirror of
https://github.com/ppy/osu
synced 2024-12-26 17:02:59 +00:00
Preview visual settings at the “loading” screen
This commit is contained in:
parent
d437c1d7ec
commit
a860dd7208
@ -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
|
||||
|
@ -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);
|
||||
|
@ -88,7 +88,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
base.OnEntering(last);
|
||||
|
||||
Background.FadeTo(0.4f, 250);
|
||||
ConfigureBackgroundUpdate();
|
||||
|
||||
Content.ScaleTo(0.7f);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user