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

Add back the ability to close mod select using enter key

I've seen this brought up a few times (with people thinking
the fact it's not working is a bug) so we'll need to keep this
behaviour for now.
This commit is contained in:
Dean Herbert 2023-07-27 02:36:24 +09:00
parent 0b5be51ee0
commit 8d5efc9612

View File

@ -638,8 +638,12 @@ namespace osu.Game.Overlays.Mods
case GlobalAction.Select:
{
// Pressing select should select first filtered mod if a search is in progress.
// If nothing is selected, it should exit the dialog (a bit weird, but this is the expectation from stable).
if (string.IsNullOrEmpty(SearchTerm))
{
Hide();
return true;
}
ModState? firstMod = columnFlow.Columns.OfType<ModColumn>().FirstOrDefault(m => m.IsPresent)?.AvailableMods.FirstOrDefault(x => x.Visible);