1
0
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:
Dean Herbert 2017-08-16 22:55:13 +09:00
parent 71f83dbdfa
commit c41ba7b704

View File

@ -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