mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 16:12:54 +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.Linq;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.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),
|
||||
};
|
||||
|
||||
protected override bool PropagateKeyDown(IEnumerable<Drawable> drawables, InputState state, KeyDownEventArgs args)
|
||||
{
|
||||
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);
|
||||
}
|
||||
protected override IEnumerable<Drawable> GetKeyboardInputQueue() => new[] { handler }.Concat(base.GetKeyboardInputQueue());
|
||||
}
|
||||
|
||||
public enum GlobalAction
|
||||
|
Loading…
Reference in New Issue
Block a user