1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-01 17:02:55 +08:00

Move latency certifier and import files button outside debug section

This commit is contained in:
Salman Alshamrani 2024-12-05 02:41:00 -05:00
parent aa0ee5cf3a
commit f83ec721fb
3 changed files with 38 additions and 15 deletions

View File

@ -5,11 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Framework.Screens;
using osu.Game.Localisation; using osu.Game.Localisation;
using osu.Game.Screens;
using osu.Game.Screens.Import;
using osu.Game.Screens.Utility;
namespace osu.Game.Overlays.Settings.Sections.DebugSettings namespace osu.Game.Overlays.Settings.Sections.DebugSettings
{ {
@ -18,7 +14,7 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
protected override LocalisableString Header => CommonStrings.General; protected override LocalisableString Header => CommonStrings.General;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig, IPerformFromScreenRunner? performer) private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig)
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
@ -32,16 +28,6 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
LabelText = DebugSettingsStrings.BypassFrontToBackPass, LabelText = DebugSettingsStrings.BypassFrontToBackPass,
Current = config.GetBindable<bool>(DebugSetting.BypassFrontToBackPass) Current = config.GetBindable<bool>(DebugSetting.BypassFrontToBackPass)
}, },
new SettingsButton
{
Text = DebugSettingsStrings.ImportFiles,
Action = () => performer?.PerformFromScreen(menu => menu.Push(new FileImportScreen()))
},
new SettingsButton
{
Text = DebugSettingsStrings.RunLatencyCertifier,
Action = () => performer?.PerformFromScreen(menu => menu.Push(new LatencyCertifierScreen()))
}
}; };
} }
} }

View File

@ -0,0 +1,36 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Localisation;
using osu.Framework.Screens;
using osu.Game.Localisation;
using osu.Game.Screens;
using osu.Game.Screens.Import;
using osu.Game.Screens.Utility;
namespace osu.Game.Overlays.Settings.Sections.Maintenance
{
public partial class GeneralSettings : SettingsSubsection
{
protected override LocalisableString Header => CommonStrings.General;
[BackgroundDependencyLoader]
private void load(IPerformFromScreenRunner? performer)
{
Children = new[]
{
new SettingsButton
{
Text = DebugSettingsStrings.ImportFiles,
Action = () => performer?.PerformFromScreen(menu => menu.Push(new FileImportScreen()))
},
new SettingsButton
{
Text = DebugSettingsStrings.RunLatencyCertifier,
Action = () => performer?.PerformFromScreen(menu => menu.Push(new LatencyCertifierScreen()))
}
};
}
}
}

View File

@ -23,6 +23,7 @@ namespace osu.Game.Overlays.Settings.Sections
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
new GeneralSettings(),
new BeatmapSettings(), new BeatmapSettings(),
new SkinSettings(), new SkinSettings(),
new CollectionsSettings(), new CollectionsSettings(),