1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 05:02:55 +08:00

Merge pull request #18761 from frenzibyte/fix-input-regression

Fix `BlueprintContainer` eating input from skin editor buttons
This commit is contained in:
Bartłomiej Dach 2022-06-18 20:28:06 +02:00 committed by GitHub
commit 72c5ea9365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 9 deletions

View File

@ -148,7 +148,11 @@ namespace osu.Game.Tests.Visual.Navigation
private void switchToGameplayScene()
{
AddStep("Click gameplay scene button", () => skinEditor.ChildrenOfType<SkinEditorSceneLibrary.SceneButton>().First(b => b.Text == "Gameplay").TriggerClick());
AddStep("Click gameplay scene button", () =>
{
InputManager.MoveMouseTo(skinEditor.ChildrenOfType<SkinEditorSceneLibrary.SceneButton>().First(b => b.Text == "Gameplay"));
InputManager.Click(MouseButton.Left);
});
AddUntilStep("wait for player", () =>
{

View File

@ -108,13 +108,6 @@ 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

@ -39,6 +39,12 @@ namespace osu.Game.Screens.Edit.Compose.Components
private PlacementBlueprint currentPlacement;
private InputManager inputManager;
/// <remarks>
/// Positional input must be received outside the container's bounds,
/// in order to handle composer blueprints which are partially offscreen.
/// </remarks>
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
public ComposeBlueprintContainer(HitObjectComposer composer)
: base(composer)
{

View File

@ -21,6 +21,7 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Input.Bindings;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Rulesets.Edit;
using osu.Game.Screens.Edit.Compose.Components.Timeline;
using osuTK;
using osuTK.Input;
@ -103,7 +104,8 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// 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"/>
/// <seealso cref="ComposeBlueprintContainer.ReceivePositionalInputAt"/>
/// <seealso cref="TimelineBlueprintContainer.ReceivePositionalInputAt"/>
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
/// <summary>

View File

@ -35,6 +35,12 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
private Bindable<HitObject> placement;
private SelectionBlueprint<HitObject> placementBlueprint;
/// <remarks>
/// Positional input must be received outside the container's bounds,
/// in order to handle timeline blueprints which are stacked offscreen.
/// </remarks>
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => timeline.ReceivePositionalInputAt(screenSpacePos);
public TimelineBlueprintContainer(HitObjectComposer composer)
: base(composer)
{