1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 12:22:57 +08:00

don't check for shift

This commit is contained in:
David Zhao 2019-07-16 15:12:01 +09:00
parent e789bb37c8
commit b95a598338

View File

@ -16,8 +16,6 @@ namespace osu.Game.Graphics.UserInterface
public override bool HandleLeftRightArrows => false; public override bool HandleLeftRightArrows => false;
private InputManager inputManager;
public SearchTextBox() public SearchTextBox()
{ {
Height = 35; Height = 35;
@ -36,16 +34,10 @@ namespace osu.Game.Graphics.UserInterface
PlaceholderText = "type to search"; PlaceholderText = "type to search";
} }
protected override void LoadComplete()
{
inputManager = GetContainingInputManager();
base.LoadComplete();
}
protected override bool HandleAction(PlatformAction action) protected override bool HandleAction(PlatformAction action)
{ {
// Allow shift-delete to be handled locally // Allow delete to be handled locally
if (inputManager.CurrentState.Keyboard.ShiftPressed && action.ActionType == PlatformActionType.CharNext && action.ActionMethod == PlatformActionMethod.Delete) if (action.ActionType == PlatformActionType.CharNext && action.ActionMethod == PlatformActionMethod.Delete)
return false; return false;
return base.HandleAction(action); return base.HandleAction(action);