1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 16:47:46 +08:00

Remember multiplayer room filter mode

As proposed in https://github.com/ppy/osu/discussions/26218.
This commit is contained in:
Dean Herbert 2024-01-15 14:30:27 +09:00
parent 0f521d6daf
commit 6940579b9e
No known key found for this signature in database
3 changed files with 11 additions and 1 deletions

View File

@ -17,6 +17,7 @@ using osu.Game.Localisation;
using osu.Game.Overlays;
using osu.Game.Overlays.Mods.Input;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.OnlinePlay.Lounge.Components;
using osu.Game.Screens.Select;
using osu.Game.Screens.Select.Filter;
using osu.Game.Skinning;
@ -191,6 +192,8 @@ namespace osu.Game.Configuration
SetDefault(OsuSetting.EditorLimitedDistanceSnap, false);
SetDefault(OsuSetting.EditorShowSpeedChanges, false);
SetDefault(OsuSetting.MultiplayerRoomFilter, RoomPermissionsFilter.All);
SetDefault(OsuSetting.LastProcessedMetadataId, -1);
SetDefault(OsuSetting.ComboColourNormalisationAmount, 0.2f, 0f, 1f, 0.01f);
@ -423,5 +426,6 @@ namespace osu.Game.Configuration
TouchDisableGameplayTaps,
ModSelectTextSearchStartsActive,
UserOnlineStatus,
MultiplayerRoomFilter
}
}

View File

@ -4,8 +4,8 @@
#nullable disable
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using JetBrains.Annotations;
using osu.Framework.Allocation;
@ -19,6 +19,7 @@ using osu.Framework.Input.Events;
using osu.Framework.Logging;
using osu.Framework.Screens;
using osu.Framework.Threading;
using osu.Game.Configuration;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Input;
@ -77,6 +78,9 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
[CanBeNull]
private LeasedBindable<Room> selectionLease;
[Resolved]
protected OsuConfigManager Config { get; private set; }
private readonly Bindable<FilterCriteria> filter = new Bindable<FilterCriteria>(new FilterCriteria());
private readonly IBindable<bool> operationInProgress = new Bindable<bool>();
private readonly IBindable<bool> isIdle = new BindableBool();

View File

@ -12,6 +12,7 @@ using osu.Framework.Logging;
using osu.Framework.Screens;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API;
using osu.Game.Online.Multiplayer;
@ -51,6 +52,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
roomAccessTypeDropdown = new SlimEnumDropdown<RoomPermissionsFilter>
{
RelativeSizeAxes = Axes.None,
Current = Config.GetBindable<RoomPermissionsFilter>(OsuSetting.MultiplayerRoomFilter),
Width = 160,
};