1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

Select via select action

This commit is contained in:
Dean Herbert 2020-07-09 17:33:02 +09:00
parent 601101147e
commit 115bb40816
2 changed files with 13 additions and 4 deletions

View File

@ -136,8 +136,6 @@ namespace osu.Game.Overlays.SearchableList
private class FilterSearchTextBox : SearchTextBox
{
protected override bool AllowCommit => true;
[BackgroundDependencyLoader]
private void load()
{

View File

@ -100,7 +100,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
{
if (room == selectedRoom.Value)
{
JoinRequested?.Invoke(room);
joinSelected();
return;
}
@ -137,12 +137,23 @@ namespace osu.Game.Screens.Multi.Lounge.Components
selectedRoom.Value = room;
}
#region Key selection logic
private void joinSelected()
{
if (selectedRoom.Value == null) return;
JoinRequested?.Invoke(selectedRoom.Value);
}
#region Key selection logic (shared with BeatmapCarousel)
public bool OnPressed(GlobalAction action)
{
switch (action)
{
case GlobalAction.Select:
joinSelected();
return true;
case GlobalAction.SelectNext:
beginRepeatSelection(() => selectNext(1), action);
return true;