mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Change signature to new event handler
This commit is contained in:
@ -5,8 +5,7 @@ using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input.EventArgs;
|
||||
using osu.Framework.Input.States;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
@ -53,30 +52,30 @@ namespace osu.Game.Screens.Select.Options
|
||||
|
||||
public Key? HotKey;
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
flash.FadeTo(0.1f, 1000, Easing.OutQuint);
|
||||
return base.OnMouseDown(state, args);
|
||||
return base.OnMouseDown(e);
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||
protected override bool OnMouseUp(MouseUpEvent e)
|
||||
{
|
||||
flash.FadeTo(0, 1000, Easing.OutQuint);
|
||||
return base.OnMouseUp(state, args);
|
||||
return base.OnMouseUp(e);
|
||||
}
|
||||
|
||||
protected override bool OnClick(InputState state)
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
flash.ClearTransforms();
|
||||
flash.Alpha = 0.9f;
|
||||
flash.FadeOut(800, Easing.OutExpo);
|
||||
|
||||
return base.OnClick(state);
|
||||
return base.OnClick(e);
|
||||
}
|
||||
|
||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
{
|
||||
if (!args.Repeat && args.Key == HotKey)
|
||||
if (!e.Repeat && e.Key == HotKey)
|
||||
{
|
||||
OnClick(state);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user