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