mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Fade menu background a bit when menu is active
This commit is contained in:
parent
07a1c39fe5
commit
78d78b5510
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user