mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Fix drags outside of overlay container bounds not hiding overlay
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user