1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 16:37:26 +08:00

Use local workaround instead of disabling clipboard entirely

This commit is contained in:
Susko3 2023-10-28 12:23:23 +02:00
parent cfc0520481
commit 366e41f111

View File

@ -9,6 +9,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Collections; using osu.Game.Collections;
@ -23,6 +24,7 @@ using osu.Game.Rulesets;
using osu.Game.Screens.Select.Filter; using osu.Game.Screens.Select.Filter;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
using osuTK.Input;
namespace osu.Game.Screens.Select namespace osu.Game.Screens.Select
{ {
@ -254,9 +256,6 @@ namespace osu.Game.Screens.Select
public OsuSpriteText FilterText { get; private set; } public OsuSpriteText FilterText { get; private set; }
// clipboard is disabled because one of the "cut" platform key bindings (shift-delete) conflicts with the beatmap deletion action.
protected override bool AllowClipboardExport => false;
public FilterControlTextBox() public FilterControlTextBox()
{ {
Height += filter_text_size; Height += filter_text_size;
@ -277,6 +276,15 @@ namespace osu.Game.Screens.Select
Colour = colours.Yellow Colour = colours.Yellow
}); });
} }
public override bool OnPressed(KeyBindingPressEvent<PlatformAction> e)
{
// the "cut" platform key binding (shift-delete) conflicts with the beatmap deletion action.
if (e.Action == PlatformAction.Cut && e.ShiftPressed && e.CurrentState.Keyboard.Keys.IsPressed(Key.Delete))
return false;
return base.OnPressed(e);
}
} }
} }
} }