mirror of https://github.com/ppy/osu
Fix drags outside of overlay container bounds not hiding overlay
This commit is contained in:
parent
67151afa9a
commit
03a4acaf4c
|
@ -62,15 +62,23 @@ private void load(AudioManager audio)
|
|||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue