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