mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Fix right clicks on timeline objects potentially getting eaten by playfield area
`SelectionHandler` is receiving input from anywhere out of necessity:19f892687a/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs (L119-L125)
Also important is that `BlueprintContainer` will selectively not block right clicks to make sure they fall through to the `ContextMenuContainer`:19f892687a/osu.Game/Screens/Edit/Compose/Components/BlueprintContainer.cs (L122-L126)
But because the whole editor is sharing a `ContextMenuContainer` and it's at a higher level than both components, we observe here the playfield's `SelectionHandler` intercepting the right click before it can reach the `ContextMenuContainer`. The fix here is similar to what we're already doing in `TimelineBlueprintContaienr`.
This commit is contained in:
parent
6be02966b9
commit
57d88a0ac4
@ -40,11 +40,14 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
public PlacementBlueprint CurrentPlacement { get; private set; }
|
||||
|
||||
[Resolved]
|
||||
private EditorScreenWithTimeline editorScreen { get; set; }
|
||||
|
||||
/// <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 override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => editorScreen.MainContent.ReceivePositionalInputAt(screenSpacePos);
|
||||
|
||||
public ComposeBlueprintContainer(HitObjectComposer composer)
|
||||
: base(composer)
|
||||
|
@ -11,13 +11,14 @@ using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||
|
||||
namespace osu.Game.Screens.Edit
|
||||
{
|
||||
[Cached]
|
||||
public abstract partial class EditorScreenWithTimeline : EditorScreen
|
||||
{
|
||||
public const float PADDING = 10;
|
||||
|
||||
private Container timelineContainer = null!;
|
||||
public Container TimelineContent = null!;
|
||||
|
||||
private Container mainContent = null!;
|
||||
public Container MainContent = null!;
|
||||
|
||||
private LoadingSpinner spinner = null!;
|
||||
|
||||
@ -70,7 +71,7 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
new Drawable[]
|
||||
{
|
||||
timelineContainer = new Container
|
||||
TimelineContent = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
@ -93,7 +94,7 @@ namespace osu.Game.Screens.Edit
|
||||
},
|
||||
new Drawable[]
|
||||
{
|
||||
mainContent = new Container
|
||||
MainContent = new Container
|
||||
{
|
||||
Name = "Main content",
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -116,10 +117,10 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
spinner.State.Value = Visibility.Hidden;
|
||||
|
||||
mainContent.Add(content);
|
||||
MainContent.Add(content);
|
||||
content.FadeInFromZero(300, Easing.OutQuint);
|
||||
|
||||
LoadComponentAsync(new TimelineArea(CreateTimelineContent()), timelineContainer.Add);
|
||||
LoadComponentAsync(new TimelineArea(CreateTimelineContent()), TimelineContent.Add);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user