mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:53:51 +08:00
Move to debug settings
This commit is contained in:
parent
dcaebd2621
commit
9a3dd12f30
@ -4,6 +4,8 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Screens.Import;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||
{
|
||||
@ -12,7 +14,7 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||
protected override string Header => "General";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig)
|
||||
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig, OsuGame game)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -27,6 +29,11 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||
Current = config.GetBindable<bool>(DebugSetting.BypassFrontToBackPass)
|
||||
}
|
||||
};
|
||||
Add(new SettingsButton
|
||||
{
|
||||
Text = "Import files",
|
||||
Action = () => game?.PerformFromScreen(menu => menu.Push(new FileImportScreen()))
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ namespace osu.Game.Screens.Menu
|
||||
public Action OnExit;
|
||||
public Action OnBeatmapListing;
|
||||
public Action OnSolo;
|
||||
public Action OnImportButton;
|
||||
public Action OnSettings;
|
||||
public Action OnMulti;
|
||||
public Action OnChart;
|
||||
@ -132,10 +131,6 @@ namespace osu.Game.Screens.Menu
|
||||
buttonsTopLevel.Add(new Button(@"play", @"button-play-select", OsuIcon.Logo, new Color4(102, 68, 204, 255), () => State = ButtonSystemState.Play, WEDGE_WIDTH, Key.P));
|
||||
buttonsTopLevel.Add(new Button(@"osu!editor", @"button-generic-select", OsuIcon.EditCircle, new Color4(238, 170, 0, 255), () => OnEdit?.Invoke(), 0, Key.E));
|
||||
buttonsTopLevel.Add(new Button(@"osu!direct", @"button-direct-select", OsuIcon.ChevronDownCircle, new Color4(165, 204, 0, 255), () => OnBeatmapListing?.Invoke(), 0, Key.D));
|
||||
if(RuntimeInfo.OS == RuntimeInfo.Platform.Android)
|
||||
{
|
||||
buttonsTopLevel.Add(new Button(@"Import File", @"button-generic-select", FontAwesome.Solid.File, new Color4(0, 86, 73, 255), () => OnImportButton?.Invoke()));
|
||||
}
|
||||
|
||||
if (host.CanExit)
|
||||
buttonsTopLevel.Add(new Button(@"exit", string.Empty, OsuIcon.CrossCircle, new Color4(238, 51, 153, 255), () => OnExit?.Invoke(), 0, Key.Q));
|
||||
|
@ -19,7 +19,6 @@ using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Edit;
|
||||
using osu.Game.Screens.Multi;
|
||||
using osu.Game.Screens.Select;
|
||||
using osu.Game.Screens.Import;
|
||||
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
@ -106,7 +105,6 @@ namespace osu.Game.Screens.Menu
|
||||
},
|
||||
OnSolo = onSolo,
|
||||
OnMulti = delegate { this.Push(new Multiplayer()); },
|
||||
OnImportButton = onImport,
|
||||
OnExit = confirmAndExit,
|
||||
}
|
||||
}
|
||||
@ -146,7 +144,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
[Resolved(canBeNull: true)]
|
||||
private OsuGame game { get; set; }
|
||||
private void onImport() => this.Push(new FileImportScreen());
|
||||
|
||||
private void confirmAndExit()
|
||||
{
|
||||
if (exitConfirmed) return;
|
||||
|
Loading…
Reference in New Issue
Block a user