mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Override Handle(UIEvent e) in IdleTracker
This commit is contained in:
@ -4,8 +4,7 @@
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Input.EventArgs;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Input.States;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Menu
|
namespace osu.Game.Screens.Menu
|
||||||
{
|
{
|
||||||
@ -24,14 +23,19 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
public bool OnReleased(PlatformAction action) => updateLastInteractionTime();
|
public bool OnReleased(PlatformAction action) => updateLastInteractionTime();
|
||||||
|
|
||||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) => updateLastInteractionTime();
|
protected override bool Handle(UIEvent e)
|
||||||
|
{
|
||||||
protected override bool OnKeyUp(InputState state, KeyUpEventArgs args) => updateLastInteractionTime();
|
switch (e)
|
||||||
|
{
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => updateLastInteractionTime();
|
case KeyDownEvent _:
|
||||||
|
case KeyUpEvent _:
|
||||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) => updateLastInteractionTime();
|
case MouseDownEvent _:
|
||||||
|
case MouseUpEvent _:
|
||||||
protected override bool OnMouseMove(InputState state) => updateLastInteractionTime();
|
case MouseMoveEvent _:
|
||||||
|
return updateLastInteractionTime();
|
||||||
|
default:
|
||||||
|
return base.Handle(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user