mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 18:52:55 +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.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Screens;
|
||||||
|
using osu.Game.Screens.Import;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Debug
|
namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||||
{
|
{
|
||||||
@ -12,7 +14,7 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
|
|||||||
protected override string Header => "General";
|
protected override string Header => "General";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig)
|
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig, OsuGame game)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -27,6 +29,11 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
|
|||||||
Current = config.GetBindable<bool>(DebugSetting.BypassFrontToBackPass)
|
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 OnExit;
|
||||||
public Action OnBeatmapListing;
|
public Action OnBeatmapListing;
|
||||||
public Action OnSolo;
|
public Action OnSolo;
|
||||||
public Action OnImportButton;
|
|
||||||
public Action OnSettings;
|
public Action OnSettings;
|
||||||
public Action OnMulti;
|
public Action OnMulti;
|
||||||
public Action OnChart;
|
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(@"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!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));
|
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)
|
if (host.CanExit)
|
||||||
buttonsTopLevel.Add(new Button(@"exit", string.Empty, OsuIcon.CrossCircle, new Color4(238, 51, 153, 255), () => OnExit?.Invoke(), 0, Key.Q));
|
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.Edit;
|
||||||
using osu.Game.Screens.Multi;
|
using osu.Game.Screens.Multi;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
using osu.Game.Screens.Import;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Menu
|
namespace osu.Game.Screens.Menu
|
||||||
{
|
{
|
||||||
@ -106,7 +105,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
},
|
},
|
||||||
OnSolo = onSolo,
|
OnSolo = onSolo,
|
||||||
OnMulti = delegate { this.Push(new Multiplayer()); },
|
OnMulti = delegate { this.Push(new Multiplayer()); },
|
||||||
OnImportButton = onImport,
|
|
||||||
OnExit = confirmAndExit,
|
OnExit = confirmAndExit,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -146,7 +144,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private OsuGame game { get; set; }
|
private OsuGame game { get; set; }
|
||||||
private void onImport() => this.Push(new FileImportScreen());
|
|
||||||
private void confirmAndExit()
|
private void confirmAndExit()
|
||||||
{
|
{
|
||||||
if (exitConfirmed) return;
|
if (exitConfirmed) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user