Adapt to PlatformAction type change

This commit is contained in:
ekrctb
2021-07-20 14:23:34 +09:00
parent 747c475b95
commit 1bac471b49
8 changed files with 28 additions and 33 deletions

View File

@ -32,20 +32,15 @@ namespace osu.Game.Graphics.UserInterface
public override bool OnPressed(PlatformAction action)
{
switch (action.ActionType)
switch (action)
{
case PlatformActionType.LineEnd:
case PlatformActionType.LineStart:
return false;
case PlatformAction.MoveBackwardLine:
case PlatformAction.MoveForwardLine:
// Shift+delete is handled via PlatformAction on macOS. this is not so useful in the context of a SearchTextBox
// as we do not allow arrow key navigation in the first place (ie. the caret should always be at the end of text)
// Avoid handling it here to allow other components to potentially consume the shortcut.
case PlatformActionType.CharNext:
if (action.ActionMethod == PlatformActionMethod.Delete)
return false;
break;
case PlatformAction.DeleteForwardChar:
return false;
}
return base.OnPressed(action);