1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-03 02:31:25 +08:00

Remove song select dependency from FooterButtonOptions

This commit is contained in:
Dan Balasescu
2025-10-16 17:40:19 +09:00
Unverified
parent 81a529200d
commit b4b26e3a1d
4 changed files with 8 additions and 6 deletions
@@ -53,7 +53,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
{
new FooterButtonMods(modOverlay) { Current = SelectedMods },
new FooterButtonRandom(),
new FooterButtonOptions(),
new FooterButtonOptions(null),
});
});
-2
View File
@@ -117,8 +117,6 @@ namespace osu.Game.Screens
internal void CreateLeasedDependencies(IReadOnlyDependencyContainer dependencies) => createDependencies(dependencies);
internal void LoadComponentsAgainstScreenDependencies(IEnumerable<Drawable> components) => LoadComponents(components);
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
if (screenDependencies == null)
@@ -23,8 +23,12 @@ namespace osu.Game.Screens.SelectV2
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; } = null!;
[Resolved]
private ISongSelect? songSelect { get; set; }
private readonly ISongSelect? songSelect;
public FooterButtonOptions(ISongSelect? songSelect)
{
this.songSelect = songSelect;
}
[BackgroundDependencyLoader]
private void load(OsuColour colour)
+1 -1
View File
@@ -352,7 +352,7 @@ namespace osu.Game.Screens.SelectV2
errorSample?.Play();
}
},
new FooterButtonOptions
new FooterButtonOptions(this)
{
Hotkey = GlobalAction.ToggleBeatmapOptions,
}