diff --git a/osu.Android.props b/osu.Android.props index adc340a734..896b10133d 100644 --- a/osu.Android.props +++ b/osu.Android.props @@ -1,5 +1,7 @@ + Debug + AnyCPU bin\$(Configuration) 4 2.0 @@ -35,7 +37,7 @@ None True prompt - true + true false SdkOnly False diff --git a/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs b/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs index 9c948d6f90..a4121acfca 100644 --- a/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs +++ b/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs @@ -62,21 +62,31 @@ namespace osu.Game.Graphics.Containers protected override bool OnClick(ClickEvent e) { - closeIfOutside(e); + if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition)) + Hide(); return base.OnClick(e); } - protected override bool OnDragEnd(DragEndEvent e) - { - closeIfOutside(e); - return base.OnDragEnd(e); - } + private bool closeOnDragEnd; - private void closeIfOutside(MouseEvent e) + protected override bool OnDragStart(DragStartEvent e) { if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition)) + closeOnDragEnd = true; + + return base.OnDragStart(e); + } + + protected override bool OnDragEnd(DragEndEvent e) + { + if (closeOnDragEnd) + { Hide(); + closeOnDragEnd = false; + } + + return base.OnDragEnd(e); } public virtual bool OnPressed(GlobalAction action) diff --git a/osu.Game/Screens/Play/GameplayMenuOverlay.cs b/osu.Game/Screens/Play/GameplayMenuOverlay.cs index c5202fa792..f54d638584 100644 --- a/osu.Game/Screens/Play/GameplayMenuOverlay.cs +++ b/osu.Game/Screens/Play/GameplayMenuOverlay.cs @@ -313,5 +313,22 @@ namespace osu.Game.Screens.Play return base.OnMouseMove(e); } } + + [Resolved] + private GlobalActionContainer globalAction { get; set; } + + protected override bool Handle(UIEvent e) + { + switch (e) + { + case ScrollEvent _: + if (ReceivePositionalInputAt(e.ScreenSpaceMousePosition)) + return globalAction.TriggerEvent(e); + + break; + } + + return base.Handle(e); + } } }