mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Change signature to new event handler
This commit is contained in:
@ -3,8 +3,7 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Input.EventArgs;
|
||||
using osu.Framework.Input.States;
|
||||
using osu.Framework.Input.Events;
|
||||
using OpenTK;
|
||||
using osu.Game.Screens.Play.PlayerSettings;
|
||||
using OpenTK.Input;
|
||||
@ -53,20 +52,20 @@ namespace osu.Game.Screens.Play.HUD
|
||||
//We want to handle keyboard inputs all the time in order to trigger ToggleVisibility() when not visible
|
||||
public override bool HandleNonPositionalInput => true;
|
||||
|
||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
{
|
||||
if (args.Repeat) return false;
|
||||
if (e.Repeat) return false;
|
||||
|
||||
if (state.Keyboard.ControlPressed)
|
||||
{
|
||||
if (args.Key == Key.H && ReplayLoaded)
|
||||
if (e.Key == Key.H && ReplayLoaded)
|
||||
{
|
||||
ToggleVisibility();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnKeyDown(state, args);
|
||||
return base.OnKeyDown(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user