mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Split out IPerformFromScreenRunner
to allow for easier testing
This commit is contained in:
@ -7,6 +7,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Screens;
|
||||
using osu.Game.Screens.Import;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.DebugSettings
|
||||
@ -16,7 +17,7 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
|
||||
protected override LocalisableString Header => DebugSettingsStrings.GeneralHeader;
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig, OsuGame game)
|
||||
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig, IPerformFromScreenRunner performer)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -34,7 +35,7 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
|
||||
Add(new SettingsButton
|
||||
{
|
||||
Text = DebugSettingsStrings.ImportFiles,
|
||||
Action = () => game?.PerformFromScreen(menu => menu.Push(new FileImportScreen()))
|
||||
Action = () => performer?.PerformFromScreen(menu => menu.Push(new FileImportScreen()))
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user