Make SelectionHandler abstract to ensure things get implemented

This commit is contained in:
Dean Herbert
2021-04-27 18:06:27 +09:00
parent f586bc46e6
commit dd3d8e5d03
5 changed files with 13 additions and 10 deletions

View File

@ -25,7 +25,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// <summary>
/// A component which outlines <see cref="DrawableHitObject"/>s and handles movement of selections.
/// </summary>
public class SelectionHandler<T> : CompositeDrawable, IKeyBindingHandler<PlatformAction>
public abstract class SelectionHandler<T> : CompositeDrawable, IKeyBindingHandler<PlatformAction>
{
/// <summary>
/// The currently selected blueprints.
@ -47,7 +47,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
[Resolved(CanBeNull = true)]
protected IEditorChangeHandler ChangeHandler { get; private set; }
public SelectionHandler()
protected SelectionHandler()
{
selectedBlueprints = new List<SelectionBlueprint<T>>();
@ -265,9 +265,11 @@ namespace osu.Game.Screens.Edit.Compose.Components
DeleteSelected();
}
protected virtual void DeleteItems(IEnumerable<T> items)
{
}
/// <summary>
/// Called whenever the deletion of items has been requested.
/// </summary>
/// <param name="items">The items to be deleted.</param>
protected abstract void DeleteItems(IEnumerable<T> items);
/// <summary>
/// Ensure the blueprint is in a selected state.