mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 08:27:49 +08:00
Use room mod select overlay rely on explicit binding rather than DI resolution
This commit is contained in:
parent
dd6e9308b3
commit
ffd788c65c
@ -16,8 +16,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
{
|
||||
public partial class RoomModSelectOverlay : UserModSelectOverlay
|
||||
{
|
||||
[Resolved]
|
||||
private IBindable<PlaylistItem> selectedItem { get; set; } = null!;
|
||||
public Bindable<PlaylistItem> SelectedItem { get; } = new Bindable<PlaylistItem>();
|
||||
|
||||
[Resolved]
|
||||
private RulesetStore rulesets { get; set; } = null!;
|
||||
@ -33,7 +32,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
selectedItem.BindValueChanged(v =>
|
||||
SelectedItem.BindValueChanged(v =>
|
||||
{
|
||||
roomRequiredMods.Clear();
|
||||
|
||||
|
@ -240,6 +240,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
|
||||
LoadComponent(UserModsSelectOverlay = new RoomModSelectOverlay
|
||||
{
|
||||
SelectedItem = { BindTarget = SelectedItem },
|
||||
SelectedMods = { BindTarget = UserMods },
|
||||
IsValidMod = _ => false
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user