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

Merge pull request #19400 from peppy/button-select-allow-more

Always allow selecting the top-most button using the select binding
This commit is contained in:
Dan Balasescu 2022-07-26 18:49:42 +09:00 committed by GitHub
commit b47f674ddb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,7 +121,11 @@ namespace osu.Game.Overlays
switch (e.Action) switch (e.Action)
{ {
case GlobalAction.Select: case GlobalAction.Select:
CurrentDialog?.Buttons.OfType<PopupDialogOkButton>().FirstOrDefault()?.TriggerClick(); var clickableButton =
CurrentDialog?.Buttons.OfType<PopupDialogOkButton>().FirstOrDefault() ??
CurrentDialog?.Buttons.First();
clickableButton?.TriggerClick();
return true; return true;
} }