mirror of
https://github.com/ppy/osu.git
synced 2026-05-16 23:03:28 +08:00
Move external skin edit overlay out of OsuGame
This commit is contained in:
@@ -1225,7 +1225,6 @@ namespace osu.Game
|
||||
loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add, true);
|
||||
loadComponentSingleFile(wikiOverlay = new WikiOverlay(), overlayContent.Add, true);
|
||||
loadComponentSingleFile(skinEditor = new SkinEditorOverlay(ScreenContainer), overlayContent.Add, true);
|
||||
loadComponentSingleFile(new ExternalEditOverlay(), overlayContent.Add, true);
|
||||
|
||||
loadComponentSingleFile(new LoginOverlay
|
||||
{
|
||||
|
||||
@@ -49,9 +49,15 @@ namespace osu.Game.Overlays.SkinEditor
|
||||
[Resolved]
|
||||
private IPerformFromScreenRunner? performer { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private IOverlayManager? overlayManager { get; set; }
|
||||
|
||||
[Cached]
|
||||
public readonly EditorClipboard Clipboard = new EditorClipboard();
|
||||
|
||||
[Cached]
|
||||
private readonly ExternalEditOverlay externalEditOverlay = new ExternalEditOverlay();
|
||||
|
||||
[Resolved]
|
||||
private OsuGame game { get; set; } = null!;
|
||||
|
||||
@@ -69,6 +75,7 @@ namespace osu.Game.Overlays.SkinEditor
|
||||
|
||||
private OsuScreen? lastTargetScreen;
|
||||
private InvokeOnDisposal? nestedInputManagerDisable;
|
||||
private IDisposable? externalEditOverlayRegistration;
|
||||
|
||||
private readonly LayoutValue drawSizeLayout;
|
||||
|
||||
@@ -86,6 +93,13 @@ namespace osu.Game.Overlays.SkinEditor
|
||||
config.BindWith(OsuSetting.BeatmapSkins, beatmapSkins);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
externalEditOverlayRegistration = overlayManager?.RegisterBlockingOverlay(externalEditOverlay);
|
||||
}
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
switch (e.Action)
|
||||
@@ -342,6 +356,14 @@ namespace osu.Game.Overlays.SkinEditor
|
||||
base.ToggleVisibility();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
externalEditOverlayRegistration?.Dispose();
|
||||
externalEditOverlayRegistration = null;
|
||||
}
|
||||
|
||||
private partial class EndlessPlayer : ReplayPlayer
|
||||
{
|
||||
protected override UserActivity? InitialActivity => null;
|
||||
|
||||
Reference in New Issue
Block a user