diff --git a/osu.Game/Screens/Edit/Compose/Components/BlueprintContainer.cs b/osu.Game/Screens/Edit/Compose/Components/BlueprintContainer.cs
index 8fa022f129..af0ac22a70 100644
--- a/osu.Game/Screens/Edit/Compose/Components/BlueprintContainer.cs
+++ b/osu.Game/Screens/Edit/Compose/Components/BlueprintContainer.cs
@@ -17,6 +17,7 @@ using osu.Game.Rulesets.Edit.Tools;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
using osuTK;
+using osuTK.Input;
namespace osu.Game.Screens.Edit.Compose.Components
{
@@ -95,12 +96,18 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected override bool OnMouseDown(MouseDownEvent e)
{
+ if (e.Button == MouseButton.Right)
+ return false;
+
beginClickSelection(e);
return true;
}
protected override bool OnClick(ClickEvent e)
{
+ if (e.Button == MouseButton.Right)
+ return false;
+
// Deselection should only occur if no selected blueprints are hovered
// A special case for when a blueprint was selected via this click is added since OnClick() may occur outside the hitobject and should not trigger deselection
if (endClickSelection() || selectionHandler.SelectedBlueprints.Any(b => b.IsHovered))
@@ -112,6 +119,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected override bool OnDoubleClick(DoubleClickEvent e)
{
+ if (e.Button == MouseButton.Right)
+ return false;
+
SelectionBlueprint clickedBlueprint = selectionHandler.SelectedBlueprints.FirstOrDefault(b => b.IsHovered);
if (clickedBlueprint == null)
@@ -123,6 +133,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected override bool OnMouseUp(MouseUpEvent e)
{
+ if (e.Button == MouseButton.Right)
+ return false;
+
// Special case for when a drag happened instead of a click
Schedule(() => endClickSelection());
return true;
@@ -141,6 +154,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected override bool OnDragStart(DragStartEvent e)
{
+ if (e.Button == MouseButton.Right)
+ return false;
+
if (!beginSelectionMovement())
{
dragBox.UpdateDrag(e);
@@ -152,6 +168,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected override bool OnDrag(DragEvent e)
{
+ if (e.Button == MouseButton.Right)
+ return false;
+
if (!moveCurrentSelection(e))
dragBox.UpdateDrag(e);
@@ -160,6 +179,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected override bool OnDragEnd(DragEndEvent e)
{
+ if (e.Button == MouseButton.Right)
+ return false;
+
if (!finishSelectionMovement())
{
dragBox.FadeOut(250, Easing.OutQuint);
diff --git a/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs b/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs
index 44bf22cfe1..779cd86318 100644
--- a/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs
+++ b/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs
@@ -7,11 +7,16 @@ using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
+using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
+using osu.Framework.Input.Events;
using osu.Framework.Input.States;
+using osu.Game.Audio;
using osu.Game.Graphics;
+using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
@@ -22,7 +27,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
///
/// A component which outlines s and handles movement of selections.
///
- public class SelectionHandler : CompositeDrawable, IKeyBindingHandler
+ public class SelectionHandler : CompositeDrawable, IKeyBindingHandler, IHasContextMenu
{
public const float BORDER_RADIUS = 2;
@@ -142,6 +147,8 @@ namespace osu.Game.Screens.Edit.Compose.Components
#endregion
+ #region Outline Display
+
///
/// Updates whether this is visible.
///
@@ -176,5 +183,63 @@ namespace osu.Game.Screens.Edit.Compose.Components
outline.Size = bottomRight - topLeft;
outline.Position = topLeft;
}
+
+ #endregion
+
+ #region Context Menu
+
+ public virtual MenuItem[] ContextMenuItems
+ {
+ get
+ {
+ if (!SelectedBlueprints.Any())
+ return Array.Empty