mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 00:09:55 +09:00
Change signature to new event handler
This commit is contained in:
@ -3,8 +3,7 @@
|
||||
|
||||
using OpenTK.Graphics;
|
||||
using System;
|
||||
using osu.Framework.Input.EventArgs;
|
||||
using osu.Framework.Input.States;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Input.Bindings;
|
||||
using OpenTK.Input;
|
||||
|
||||
@ -36,20 +35,20 @@ namespace osu.Game.Graphics.UserInterface
|
||||
// We may not be focused yet, but we need to handle keyboard input to be able to request focus
|
||||
public override bool HandleNonPositionalInput => HoldFocus || base.HandleNonPositionalInput;
|
||||
|
||||
protected override void OnFocus(InputState state)
|
||||
protected override void OnFocus(FocusEvent e)
|
||||
{
|
||||
base.OnFocus(state);
|
||||
base.OnFocus(e);
|
||||
BorderThickness = 0;
|
||||
}
|
||||
|
||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
{
|
||||
if (!HasFocus) return false;
|
||||
|
||||
if (args.Key == Key.Escape)
|
||||
if (e.Key == Key.Escape)
|
||||
return false; // disable the framework-level handling of escape key for confority (we use GlobalAction.Back).
|
||||
|
||||
return base.OnKeyDown(state, args);
|
||||
return base.OnKeyDown(e);
|
||||
}
|
||||
|
||||
public override bool OnPressed(GlobalAction action)
|
||||
|
Reference in New Issue
Block a user