mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +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)
|
protected override bool OnClick(ClickEvent e)
|
||||||
{
|
{
|
||||||
if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
|
closeIfOutside(e);
|
||||||
{
|
|
||||||
Hide();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return base.OnClick(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)
|
public virtual bool OnPressed(GlobalAction action)
|
||||||
{
|
{
|
||||||
switch (action)
|
switch (action)
|
||||||
|
Reference in New Issue
Block a user