Merge pull request #13962 from ekrctb/platform-action

Adapt to framework `PlatformAction` type change
This commit is contained in:
Dean Herbert
2021-07-21 18:17:38 +09:00
committed by GitHub
11 changed files with 32 additions and 37 deletions

View File

@ -230,9 +230,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
public bool OnPressed(PlatformAction action)
{
switch (action.ActionType)
switch (action)
{
case PlatformActionType.SelectAll:
case PlatformAction.SelectAll:
SelectAll();
return true;
}

View File

@ -139,9 +139,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
public bool OnPressed(PlatformAction action)
{
switch (action.ActionMethod)
switch (action)
{
case PlatformActionMethod.Delete:
case PlatformAction.Delete:
DeleteSelected();
return true;
}

View File

@ -80,7 +80,7 @@ namespace osu.Game.Screens.Edit.Compose
public bool OnPressed(PlatformAction action)
{
if (action.ActionType == PlatformActionType.Copy)
if (action == PlatformAction.Copy)
host.GetClipboard().SetText(formatSelectionAsString());
return false;

View File

@ -330,29 +330,29 @@ namespace osu.Game.Screens.Edit
public bool OnPressed(PlatformAction action)
{
switch (action.ActionType)
switch (action)
{
case PlatformActionType.Cut:
case PlatformAction.Cut:
Cut();
return true;
case PlatformActionType.Copy:
case PlatformAction.Copy:
Copy();
return true;
case PlatformActionType.Paste:
case PlatformAction.Paste:
Paste();
return true;
case PlatformActionType.Undo:
case PlatformAction.Undo:
Undo();
return true;
case PlatformActionType.Redo:
case PlatformAction.Redo:
Redo();
return true;
case PlatformActionType.Save:
case PlatformAction.Save:
Save();
return true;
}