mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +08:00
Add region
for import methods and move Dispose
to end of time
This commit is contained in:
parent
dac5dfde8f
commit
de30a42558
@ -197,13 +197,6 @@ namespace osu.Game.Skinning.Editor
|
||||
SelectedComponents.BindCollectionChanged((_, __) => Scheduler.AddOnce(populateSettings), true);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
game?.UnregisterImportHandler(this);
|
||||
}
|
||||
|
||||
public void UpdateTargetScreen(Drawable targetScreen)
|
||||
{
|
||||
this.targetScreen = targetScreen;
|
||||
@ -337,6 +330,8 @@ namespace osu.Game.Skinning.Editor
|
||||
availableTargets.FirstOrDefault(t => t.Components.Contains(item))?.Remove(item);
|
||||
}
|
||||
|
||||
#region Drag & drop import handling
|
||||
|
||||
public Task Import(params string[] paths)
|
||||
{
|
||||
Schedule(() =>
|
||||
@ -368,5 +363,14 @@ namespace osu.Game.Skinning.Editor
|
||||
public Task Import(params ImportTask[] tasks) => throw new NotImplementedException();
|
||||
|
||||
public IEnumerable<string> HandledExtensions => new[] { ".jpg", ".jpeg", ".png" };
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
game?.UnregisterImportHandler(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user