mirror of
https://github.com/ppy/osu
synced 2025-02-27 16:11:43 +00:00
basic background dim
This commit is contained in:
parent
d39da80b1b
commit
ba81222af6
@ -21,6 +21,8 @@ using OpenTK;
|
|||||||
using osu.Framework.GameModes;
|
using osu.Framework.GameModes;
|
||||||
using osu.Game.Modes.UI;
|
using osu.Game.Modes.UI;
|
||||||
using osu.Game.Screens.Ranking;
|
using osu.Game.Screens.Ranking;
|
||||||
|
using osu.Game.Configuration;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
{
|
{
|
||||||
@ -42,6 +44,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private ScoreProcessor scoreProcessor;
|
private ScoreProcessor scoreProcessor;
|
||||||
private HitRenderer hitRenderer;
|
private HitRenderer hitRenderer;
|
||||||
|
private Bindable<int> dimLevel;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game)
|
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game)
|
||||||
@ -110,6 +113,7 @@ namespace osu.Game.Screens.Play
|
|||||||
},
|
},
|
||||||
scoreOverlay,
|
scoreOverlay,
|
||||||
};
|
};
|
||||||
|
dimLevel = game.Config.GetBindable<int>(OsuConfig.DimLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -145,10 +149,17 @@ namespace osu.Game.Screens.Play
|
|||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
|
|
||||||
(Background as BackgroundModeBeatmap)?.BlurTo(Vector2.Zero, 1000);
|
(Background as BackgroundModeBeatmap)?.BlurTo(Vector2.Zero, 1000);
|
||||||
|
(Background as BackgroundModeBeatmap)?.FadeTo((100f- dimLevel)/100,1000);
|
||||||
|
|
||||||
Content.Alpha = 0;
|
Content.Alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool OnExiting(GameMode next)
|
||||||
|
{
|
||||||
|
(Background as BackgroundModeBeatmap)?.FadeTo(1f, 0);
|
||||||
|
return base.OnExiting(next);
|
||||||
|
}
|
||||||
|
|
||||||
class PlayerInputManager : UserInputManager
|
class PlayerInputManager : UserInputManager
|
||||||
{
|
{
|
||||||
public PlayerInputManager(BasicGameHost host)
|
public PlayerInputManager(BasicGameHost host)
|
||||||
|
Loading…
Reference in New Issue
Block a user