1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 22:22:54 +08:00

Allow confirming keybinding overwrite on conflict via "select" binding

This commit is contained in:
Bartłomiej Dach 2024-04-23 12:44:16 +02:00
parent a978518a74
commit 1e0db1ab9f
No known key found for this signature in database

View File

@ -152,6 +152,17 @@ namespace osu.Game.Overlays.Settings.Sections.Input
newPreview.IsChosen.Value = applyNewButton.IsHovered;
}
public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
{
if (e.Action == GlobalAction.Select && !e.Repeat)
{
applyNew();
return true;
}
return base.OnPressed(e);
}
private partial class ConflictingKeyBindingPreview : CompositeDrawable
{
private readonly object action;