mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 19:52:55 +08:00
Allow confirming keybinding overwrite on conflict via "select" binding
This commit is contained in:
parent
a978518a74
commit
1e0db1ab9f
@ -152,6 +152,17 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
newPreview.IsChosen.Value = applyNewButton.IsHovered;
|
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 partial class ConflictingKeyBindingPreview : CompositeDrawable
|
||||||
{
|
{
|
||||||
private readonly object action;
|
private readonly object action;
|
||||||
|
Loading…
Reference in New Issue
Block a user