mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Fix manual input manager test scenes not matching game input hierarchy
Fix popover using on key down Fix popover not expiring when using global action
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Effects;
|
||||
@ -14,6 +15,7 @@ using osu.Framework.Input.Events;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Overlays;
|
||||
using osuTK;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterfaceV2
|
||||
{
|
||||
@ -58,6 +60,14 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
||||
this.FadeOut(fade_duration, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
{
|
||||
if (e.Key == Key.Escape)
|
||||
return false; // disable the framework-level handling of escape key for conformity (we use GlobalAction.Back).
|
||||
|
||||
return base.OnKeyDown(e);
|
||||
}
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
@ -68,7 +78,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
||||
|
||||
if (e.Action == GlobalAction.Back)
|
||||
{
|
||||
Hide();
|
||||
this.HidePopover();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user