mirror of https://github.com/ppy/osu
Make the cursors click every so often
This commit is contained in:
parent
af09ed1b7f
commit
74440dcfdc
|
@ -22,7 +22,7 @@ private void load()
|
|||
{
|
||||
SetContents(() => new MovingCursorInputManager
|
||||
{
|
||||
Child = new OsuCursorContainer
|
||||
Child = new ClickingCursorContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
|
@ -30,6 +30,21 @@ private void load()
|
|||
});
|
||||
}
|
||||
|
||||
private class ClickingCursorContainer : OsuCursorContainer
|
||||
{
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
double currentTime = Time.Current;
|
||||
|
||||
if (((int)(currentTime / 1000)) % 2 == 0)
|
||||
OnPressed(OsuAction.LeftButton);
|
||||
else
|
||||
OnReleased(OsuAction.LeftButton);
|
||||
}
|
||||
}
|
||||
|
||||
private class MovingCursorInputManager : ManualInputManager
|
||||
{
|
||||
public MovingCursorInputManager()
|
||||
|
|
Loading…
Reference in New Issue