mirror of
https://github.com/ppy/osu
synced 2024-12-28 01:42:57 +00:00
Merge pull request #24375 from peppy/add-back-mode-select-enter-close
Add back the ability to close mod select using enter key
This commit is contained in:
commit
057bac39dd
@ -542,7 +542,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
AddStep("clear search", () => modSelectOverlay.SearchTerm = string.Empty);
|
||||
AddStep("press enter", () => InputManager.Key(Key.Enter));
|
||||
AddAssert("mod select still visible", () => modSelectOverlay.State.Value == Visibility.Visible);
|
||||
AddAssert("mod select hidden", () => modSelectOverlay.State.Value == Visibility.Hidden);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -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 there is no search in progress, it should exit the dialog (a bit weird, but this is the expectation from stable).
|
||||
if (string.IsNullOrEmpty(SearchTerm))
|
||||
{
|
||||
hideOverlay(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
ModState? firstMod = columnFlow.Columns.OfType<ModColumn>().FirstOrDefault(m => m.IsPresent)?.AvailableMods.FirstOrDefault(x => x.Visible);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user