mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Remove usage of HideOnEscape
This commit is contained in:
parent
99c54e348c
commit
7e21ddb5eb
@ -27,8 +27,6 @@ namespace osu.Desktop.Overlays
|
||||
private UpdateManager updateManager;
|
||||
private NotificationOverlay notificationOverlay;
|
||||
|
||||
protected override bool HideOnEscape => false;
|
||||
|
||||
public override bool HandleInput => false;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -5,7 +5,6 @@ using OpenTK.Graphics;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Input;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
@ -37,16 +36,18 @@ namespace osu.Game.Graphics.UserInterface
|
||||
BorderThickness = 0;
|
||||
}
|
||||
|
||||
protected override void OnFocusLost(InputState state)
|
||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||
{
|
||||
if (state.Keyboard.Keys.Any(key => key == Key.Escape))
|
||||
if (args.Key == Key.Escape)
|
||||
{
|
||||
if (Text.Length > 0)
|
||||
Text = string.Empty;
|
||||
else
|
||||
Exit?.Invoke();
|
||||
return true;
|
||||
}
|
||||
base.OnFocusLost(state);
|
||||
|
||||
return base.OnKeyDown(state, args);
|
||||
}
|
||||
|
||||
public override bool RequestsFocus => HoldFocus;
|
||||
|
@ -15,8 +15,6 @@ namespace osu.Game.Graphics.UserInterface.Volume
|
||||
{
|
||||
private readonly VolumeMeter volumeMeterMaster;
|
||||
|
||||
protected override bool HideOnEscape => false;
|
||||
|
||||
private void volumeChanged(double newVolume)
|
||||
{
|
||||
Show();
|
||||
|
@ -22,8 +22,6 @@ namespace osu.Game.Overlays.Toolbar
|
||||
|
||||
private readonly ToolbarUserArea userArea;
|
||||
|
||||
protected override bool HideOnEscape => false;
|
||||
|
||||
protected override bool BlockPassThroughMouse => false;
|
||||
|
||||
private const double transition_time = 500;
|
||||
|
@ -22,8 +22,6 @@ namespace osu.Game.Screens.Play
|
||||
private const int button_height = 70;
|
||||
private const float background_alpha = 0.75f;
|
||||
|
||||
protected override bool HideOnEscape => false;
|
||||
|
||||
protected override bool BlockPassThroughKeyboard => true;
|
||||
|
||||
public Action OnRetry;
|
||||
@ -95,7 +93,8 @@ namespace osu.Game.Screens.Play
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Height = button_height,
|
||||
Action = delegate {
|
||||
Action = delegate
|
||||
{
|
||||
action?.Invoke();
|
||||
Hide();
|
||||
}
|
||||
|
@ -18,8 +18,6 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
private const int bottom_bar_height = 5;
|
||||
|
||||
protected override bool HideOnEscape => false;
|
||||
|
||||
private static readonly Vector2 handle_size = new Vector2(14, 25);
|
||||
|
||||
private const float transition_duration = 200;
|
||||
|
@ -50,8 +50,6 @@ namespace osu.Game.Screens.Select
|
||||
AlwaysPresent = true;
|
||||
}
|
||||
|
||||
protected override bool HideOnEscape => false;
|
||||
|
||||
protected override bool BlockPassThroughMouse => false;
|
||||
|
||||
protected override void PopIn()
|
||||
|
Loading…
Reference in New Issue
Block a user