Extract class for clipboard contents for DI purposes

This commit is contained in:
Bartłomiej Dach
2021-11-10 12:36:23 +01:00
parent 410e9159d1
commit 5e31e890ae
5 changed files with 29 additions and 11 deletions

View File

@ -28,7 +28,6 @@ namespace osu.Game.Screens.Edit.Compose
[Resolved]
private EditorClock clock { get; set; }
[Resolved(Name = nameof(Editor.Clipboard))]
private Bindable<string> clipboard { get; set; }
private HitObjectComposer composer;
@ -77,6 +76,12 @@ namespace osu.Game.Screens.Edit.Compose
return new EditorSkinProvidingContainer(EditorBeatmap).WithChild(content);
}
[BackgroundDependencyLoader]
private void load(EditorClipboard clipboard)
{
this.clipboard = clipboard.Content.GetBoundCopy();
}
protected override void LoadComplete()
{
base.LoadComplete();