From ffd788c65cbb0794d0dcdba88bc1ff7c2595c5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Thu, 30 May 2024 14:15:23 +0200 Subject: [PATCH] Use room mod select overlay rely on explicit binding rather than DI resolution --- osu.Game/Screens/OnlinePlay/Match/RoomModSelectOverlay.cs | 5 ++--- osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomModSelectOverlay.cs b/osu.Game/Screens/OnlinePlay/Match/RoomModSelectOverlay.cs index 55e077df0f..6a856d8d72 100644 --- a/osu.Game/Screens/OnlinePlay/Match/RoomModSelectOverlay.cs +++ b/osu.Game/Screens/OnlinePlay/Match/RoomModSelectOverlay.cs @@ -16,8 +16,7 @@ namespace osu.Game.Screens.OnlinePlay.Match { public partial class RoomModSelectOverlay : UserModSelectOverlay { - [Resolved] - private IBindable selectedItem { get; set; } = null!; + public Bindable SelectedItem { get; } = new Bindable(); [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(); diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs index a694faebac..4eb092d08b 100644 --- a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs @@ -240,6 +240,7 @@ namespace osu.Game.Screens.OnlinePlay.Match LoadComponent(UserModsSelectOverlay = new RoomModSelectOverlay { + SelectedItem = { BindTarget = SelectedItem }, SelectedMods = { BindTarget = UserMods }, IsValidMod = _ => false });