diff --git a/osu.Game/Overlays/Mods/ModSelectOverlay.cs b/osu.Game/Overlays/Mods/ModSelectOverlay.cs index 47362c0003..25293e8e20 100644 --- a/osu.Game/Overlays/Mods/ModSelectOverlay.cs +++ b/osu.Game/Overlays/Mods/ModSelectOverlay.cs @@ -418,7 +418,7 @@ private IEnumerable createColumns() yield return new ColumnDimContainer(new ModPresetColumn { Margin = new MarginPadding { Right = 10 } - }, this); + }); } yield return createModColumnContent(ModType.DifficultyReduction); @@ -436,7 +436,7 @@ private ColumnDimContainer createModColumnContent(ModType modType) column.Margin = new MarginPadding { Right = 10 }; }); - return new ColumnDimContainer(column, this); + return new ColumnDimContainer(column); } private void createLocalMods() @@ -895,17 +895,13 @@ internal partial class ColumnDimContainer : Container [Resolved] private OsuColour colours { get; set; } = null!; - private ModSelectOverlay modSelectOverlayInstance; - - public ColumnDimContainer(ModSelectColumn column, ModSelectOverlay modSelectOverlay) + public ColumnDimContainer(ModSelectColumn column) { AutoSizeAxes = Axes.X; RelativeSizeAxes = Axes.Y; Child = Column = column; column.Active.BindTo(Active); - - this.modSelectOverlayInstance = modSelectOverlay; } [BackgroundDependencyLoader] @@ -953,7 +949,7 @@ protected override bool OnClick(ClickEvent e) RequestScroll?.Invoke(this); // Killing focus is done here because it's the only feasible place on ModSelectOverlay you can click on without triggering any action. - modSelectOverlayInstance.setTextBoxFocus(false); + Scheduler.Add(() => GetContainingInputManager().ChangeFocus(null)); return true; }