mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 02:03:04 +08:00
Update with latest framework changes
This commit is contained in:
parent
71f83dbdfa
commit
c41ba7b704
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Input;
|
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
|
|
||||||
namespace osu.Game.Input.Bindings
|
namespace osu.Game.Input.Bindings
|
||||||
@ -31,23 +30,7 @@ namespace osu.Game.Input.Bindings
|
|||||||
new KeyBinding(new[] { Key.LControl, Key.D }, GlobalAction.ToggleDirect),
|
new KeyBinding(new[] { Key.LControl, Key.D }, GlobalAction.ToggleDirect),
|
||||||
};
|
};
|
||||||
|
|
||||||
protected override bool PropagateKeyDown(IEnumerable<Drawable> drawables, InputState state, KeyDownEventArgs args)
|
protected override IEnumerable<Drawable> GetKeyboardInputQueue() => new[] { handler }.Concat(base.GetKeyboardInputQueue());
|
||||||
{
|
|
||||||
if (handler != null)
|
|
||||||
drawables = new[] { handler }.Concat(drawables);
|
|
||||||
|
|
||||||
// always handle ourselves before all children.
|
|
||||||
return base.PropagateKeyDown(drawables, state, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool PropagateKeyUp(IEnumerable<Drawable> drawables, InputState state, KeyUpEventArgs args)
|
|
||||||
{
|
|
||||||
if (handler != null)
|
|
||||||
drawables = new[] { handler }.Concat(drawables);
|
|
||||||
|
|
||||||
// always handle ourselves before all children.
|
|
||||||
return base.PropagateKeyUp(drawables, state, args);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum GlobalAction
|
public enum GlobalAction
|
||||||
|
Loading…
Reference in New Issue
Block a user