mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 11:32:54 +08:00
Derive from FocusedOverlayContainer and remove custom focus logic.
This commit is contained in:
parent
cee1c14557
commit
c683cdbb1d
@ -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]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ using osu.Framework.Graphics.Transformations;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
public abstract class WaveOverlayContainer : OverlayContainer
|
public abstract class WaveOverlayContainer : FocusedOverlayContainer
|
||||||
{
|
{
|
||||||
protected const float APPEAR_DURATION = 800;
|
protected const float APPEAR_DURATION = 800;
|
||||||
protected const float DISAPPEAR_DURATION = 500;
|
protected const float DISAPPEAR_DURATION = 500;
|
||||||
|
Loading…
Reference in New Issue
Block a user