mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Preview visual settings at the “loading” screen
This commit is contained in:
@ -262,10 +262,7 @@ namespace osu.Game.Screens.Play
|
|||||||
if (!loadedSuccessfully)
|
if (!loadedSuccessfully)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DimLevel.ValueChanged += _ => UpdateBackgroundElements();
|
ConfigureBackgroundUpdate();
|
||||||
BlurLevel.ValueChanged += _ => UpdateBackgroundElements();
|
|
||||||
ShowStoryboard.ValueChanged += _ => UpdateBackgroundElements();
|
|
||||||
UpdateBackgroundElements();
|
|
||||||
|
|
||||||
Content.Alpha = 0;
|
Content.Alpha = 0;
|
||||||
Content
|
Content
|
||||||
|
@ -46,6 +46,14 @@ namespace osu.Game.Screens.Play
|
|||||||
UserAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
|
UserAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void ConfigureBackgroundUpdate()
|
||||||
|
{
|
||||||
|
DimLevel.ValueChanged += _ => UpdateBackgroundElements();
|
||||||
|
BlurLevel.ValueChanged += _ => UpdateBackgroundElements();
|
||||||
|
ShowStoryboard.ValueChanged += _ => UpdateBackgroundElements();
|
||||||
|
UpdateBackgroundElements();
|
||||||
|
}
|
||||||
|
|
||||||
protected void UpdateBackgroundElements()
|
protected void UpdateBackgroundElements()
|
||||||
{
|
{
|
||||||
if (!IsCurrentScreen) return;
|
if (!IsCurrentScreen) return;
|
||||||
@ -60,7 +68,7 @@ namespace osu.Game.Screens.Play
|
|||||||
var beatmap = Beatmap.Value;
|
var beatmap = Beatmap.Value;
|
||||||
var storyboardVisible = ShowStoryboard && beatmap.Storyboard.HasDrawable;
|
var storyboardVisible = ShowStoryboard && beatmap.Storyboard.HasDrawable;
|
||||||
|
|
||||||
StoryboardContainer
|
StoryboardContainer?
|
||||||
.FadeColour(OsuColour.Gray(opacity), duration, Easing.OutQuint)
|
.FadeColour(OsuColour.Gray(opacity), duration, Easing.OutQuint)
|
||||||
.FadeTo(storyboardVisible && opacity > 0 ? 1 : 0, 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)
|
protected void InitializeStoryboard(bool asyncLoad)
|
||||||
{
|
{
|
||||||
|
if (StoryboardContainer == null)
|
||||||
|
return;
|
||||||
|
|
||||||
var beatmap = Beatmap.Value;
|
var beatmap = Beatmap.Value;
|
||||||
|
|
||||||
Storyboard = beatmap.Storyboard.CreateDrawable(Beatmap.Value);
|
Storyboard = beatmap.Storyboard.CreateDrawable(Beatmap.Value);
|
||||||
|
@ -88,7 +88,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
|
|
||||||
Background.FadeTo(0.4f, 250);
|
ConfigureBackgroundUpdate();
|
||||||
|
|
||||||
Content.ScaleTo(0.7f);
|
Content.ScaleTo(0.7f);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user