mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Change signature to new event handler
This commit is contained in:
@ -2,8 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input.EventArgs;
|
||||
using osu.Framework.Input.States;
|
||||
using osu.Framework.Input.Events;
|
||||
using OpenTK;
|
||||
using OpenTK.Input;
|
||||
|
||||
@ -33,11 +32,11 @@ namespace osu.Game.Graphics.UserInterface
|
||||
PlaceholderText = "type to search";
|
||||
}
|
||||
|
||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
{
|
||||
if (!state.Keyboard.ControlPressed && !state.Keyboard.ShiftPressed)
|
||||
{
|
||||
switch (args.Key)
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.Left:
|
||||
case Key.Right:
|
||||
@ -49,7 +48,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
if (!AllowCommit)
|
||||
{
|
||||
switch (args.Key)
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.KeypadEnter:
|
||||
case Key.Enter:
|
||||
@ -59,14 +58,14 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
if (state.Keyboard.ShiftPressed)
|
||||
{
|
||||
switch (args.Key)
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.Delete:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnKeyDown(state, args);
|
||||
return base.OnKeyDown(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user