1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Allow BlueprintContainer and SelectionHandler to receive input outside bounds

This commit is contained in:
Salman Ahmed 2022-06-14 00:19:15 +03:00
parent 9fc04924eb
commit c49b8e4a5c
3 changed files with 14 additions and 2 deletions

View File

@ -106,6 +106,13 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// </summary>
protected virtual bool AllowDeselectionDuringDrag => true;
/// <remarks>
/// Positional input must be received outside the container's bounds,
/// in order to handle blueprints which are partially offscreen.
/// </remarks>
/// <seealso cref="SelectionHandler{T}.ReceivePositionalInputAt"/>
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
protected override bool OnMouseDown(MouseDownEvent e)
{
bool selectionPerformed = performMouseDownActions(e);

View File

@ -30,8 +30,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// </summary>
public class ComposeBlueprintContainer : EditorBlueprintContainer
{
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
private readonly Container<PlacementBlueprint> placementBlueprintContainer;
protected new EditorSelectionHandler SelectionHandler => (EditorSelectionHandler)base.SelectionHandler;

View File

@ -97,6 +97,13 @@ namespace osu.Game.Screens.Edit.Compose.Components
#region User Input Handling
/// <remarks>
/// Positional input must be received outside the container's bounds,
/// in order to handle blueprints which are partially offscreen.
/// </remarks>
/// <seealso cref="BlueprintContainer{T}.ReceivePositionalInputAt"/>
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
/// <summary>
/// Handles the selected items being moved.
/// </summary>