mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:13:22 +08:00
move publicity filter to multi exclusively
This commit is contained in:
parent
9a15adbfff
commit
d67c482c48
@ -85,7 +85,6 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
||||
private RoomsContainer roomsContainer;
|
||||
private SearchTextBox searchTextBox;
|
||||
private Dropdown<RoomStatusFilter> statusDropdown;
|
||||
private Dropdown<RoomPublicityFilter> publicityDropdown;
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load([CanBeNull] IdleTracker idleTracker)
|
||||
@ -225,12 +224,9 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
||||
{
|
||||
SearchString = searchTextBox.Current.Value,
|
||||
Ruleset = ruleset.Value,
|
||||
Status = statusDropdown.Current.Value,
|
||||
Publicity = publicityDropdown.Current.Value,
|
||||
Status = statusDropdown.Current.Value
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
protected virtual IEnumerable<Drawable> CreateFilterControls()
|
||||
{
|
||||
statusDropdown = new SlimEnumDropdown<RoomStatusFilter>
|
||||
@ -241,17 +237,11 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
||||
|
||||
statusDropdown.Current.BindValueChanged(_ => UpdateFilter());
|
||||
|
||||
publicityDropdown = new SlimEnumDropdown<RoomPublicityFilter>
|
||||
{
|
||||
RelativeSizeAxes = Axes.None,
|
||||
Width = 160,
|
||||
};
|
||||
|
||||
publicityDropdown.Current.BindValueChanged(_ => UpdateFilter());
|
||||
|
||||
return new Drawable[] { publicityDropdown, statusDropdown, };
|
||||
yield return statusDropdown;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public override void OnEntering(ScreenTransitionEvent e)
|
||||
{
|
||||
base.OnEntering(e);
|
||||
|
@ -3,11 +3,15 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
@ -27,6 +31,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
[Resolved]
|
||||
private MultiplayerClient client { get; set; }
|
||||
|
||||
private Dropdown<RoomPublicityFilter> publicityDropdown;
|
||||
|
||||
public override void OnResuming(ScreenTransitionEvent e)
|
||||
{
|
||||
base.OnResuming(e);
|
||||
@ -40,10 +46,24 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
}
|
||||
}
|
||||
|
||||
protected override IEnumerable<Drawable> CreateFilterControls()
|
||||
{
|
||||
publicityDropdown = new SlimEnumDropdown<RoomPublicityFilter>
|
||||
{
|
||||
RelativeSizeAxes = Axes.None,
|
||||
Width = 160,
|
||||
};
|
||||
|
||||
publicityDropdown.Current.BindValueChanged(_ => UpdateFilter());
|
||||
|
||||
return base.CreateFilterControls().Prepend(publicityDropdown);
|
||||
}
|
||||
|
||||
protected override FilterCriteria CreateFilterCriteria()
|
||||
{
|
||||
var criteria = base.CreateFilterCriteria();
|
||||
criteria.Category = @"realtime";
|
||||
criteria.Publicity = publicityDropdown.Current.Value;
|
||||
return criteria;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user