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

Fix drags outside of overlay container bounds not hiding overlay

This commit is contained in:
Dean Herbert 2019-08-29 12:07:58 +09:00
parent 67151afa9a
commit 03a4acaf4c

View File

@ -62,15 +62,23 @@ namespace osu.Game.Graphics.Containers
protected override bool OnClick(ClickEvent e)
{
if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
{
Hide();
return true;
}
closeIfOutside(e);
return base.OnClick(e);
}
protected override bool OnDragEnd(DragEndEvent e)
{
closeIfOutside(e);
return base.OnDragEnd(e);
}
private void closeIfOutside(MouseEvent e)
{
if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
Hide();
}
public virtual bool OnPressed(GlobalAction action)
{
switch (action)