1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Fade menu background a bit when menu is active

This commit is contained in:
Dean Herbert 2018-09-21 03:13:15 +09:00
parent 07a1c39fe5
commit 78d78b5510

View File

@ -10,6 +10,7 @@ using osu.Framework.Input.EventArgs;
using osu.Framework.Input.States;
using osu.Framework.Screens;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Screens.Backgrounds;
using osu.Game.Screens.Charts;
@ -64,6 +65,20 @@ namespace osu.Game.Screens.Menu
},
sideFlashes = new MenuSideFlashes(),
};
buttons.StateChanged += state =>
{
switch (state)
{
case ButtonSystemState.Initial:
case ButtonSystemState.Exit:
background.FadeColour(Color4.White, 500, Easing.OutSine);
break;
default:
background.FadeColour(OsuColour.Gray(0.8f), 500, Easing.OutSine);
break;
}
};
}
[BackgroundDependencyLoader(true)]