Always allow selecting the top-most button using the select binding

This commit is contained in:
Dean Herbert 2022-07-26 17:46:23 +09:00
parent 6ff44ed2c6
commit 1539fa704b

View File

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