1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

Derive from FocusedOverlayContainer and remove custom focus logic.

This commit is contained in:
Dean Herbert 2017-02-23 12:51:32 +09:00
parent cee1c14557
commit c683cdbb1d
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
2 changed files with 1 additions and 11 deletions

View File

@ -86,16 +86,6 @@ namespace osu.Game.Overlays.Mods
}
}
public override bool RequestingFocus => State == Visibility.Visible;
protected override bool OnFocus(InputState state) => true;
protected override void OnFocusLost(InputState state)
{
if (state.Keyboard.Keys.Contains(Key.Escape))
Hide();
base.OnFocusLost(state);
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{

View File

@ -12,7 +12,7 @@ using osu.Framework.Graphics.Transformations;
namespace osu.Game.Overlays
{
public abstract class WaveOverlayContainer : OverlayContainer
public abstract class WaveOverlayContainer : FocusedOverlayContainer
{
protected const float APPEAR_DURATION = 800;
protected const float DISAPPEAR_DURATION = 500;