1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-20 22:21:10 +08:00

Reorder methods and surround with region

This commit is contained in:
Dean Herbert
2021-03-29 18:46:32 +09:00
Unverified
parent cdb779f764
commit 90ab765cf5
+15 -11
View File
@@ -85,6 +85,20 @@ namespace osu.Game.Screens.Edit.Compose
return beatmapSkinProvider.WithChild(rulesetSkinProvider.WithChild(content));
}
#region Input Handling
public bool OnPressed(PlatformAction action)
{
if (action.ActionType == PlatformActionType.Copy)
host.GetClipboard().SetText(formatSelectionAsString());
return false;
}
public void OnReleased(PlatformAction action)
{
}
private string formatSelectionAsString()
{
var builder = new StringBuilder();
@@ -98,16 +112,6 @@ namespace osu.Game.Screens.Edit.Compose
return builder.ToString();
}
public bool OnPressed(PlatformAction action)
{
if (action.ActionType == PlatformActionType.Copy)
host.GetClipboard().SetText(formatSelectionAsString());
return false;
}
public void OnReleased(PlatformAction action)
{
}
#endregion
}
}