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:
parent
601101147e
commit
115bb40816
@ -136,8 +136,6 @@ namespace osu.Game.Overlays.SearchableList
|
||||
|
||||
private class FilterSearchTextBox : SearchTextBox
|
||||
{
|
||||
protected override bool AllowCommit => true;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user