mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-07 18:13:35 +08:00
Prevent dragging/resizing panels underneath the focused panel
This commit is contained in:
parent
0d385c9cb8
commit
bd6de84f93
@ -46,10 +46,12 @@ namespace UnityExplorer.UI.Utility
|
|||||||
else
|
else
|
||||||
state = MouseState.NotPressed;
|
state = MouseState.NotPressed;
|
||||||
|
|
||||||
|
var mousePos = InputManager.MousePosition;
|
||||||
|
|
||||||
handledInstanceThisFrame = false;
|
handledInstanceThisFrame = false;
|
||||||
foreach (var instance in Instances)
|
foreach (var instance in Instances)
|
||||||
{
|
{
|
||||||
instance.Update(state, InputManager.MousePosition);
|
instance.Update(state, mousePos);
|
||||||
if (handledInstanceThisFrame)
|
if (handledInstanceThisFrame)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -162,9 +164,10 @@ namespace UnityExplorer.UI.Utility
|
|||||||
OnEndResize();
|
OnEndResize();
|
||||||
handledInstanceThisFrame = true;
|
handledInstanceThisFrame = true;
|
||||||
}
|
}
|
||||||
else if (!inDragPos && MouseInResizeArea(resizePos) && (type = GetResizeType(resizePos)) != ResizeTypes.NONE)
|
else if (!inDragPos && MouseInResizeArea(resizePos))
|
||||||
{
|
{
|
||||||
OnHoverResize(type);
|
if ((type = GetResizeType(resizePos)) != ResizeTypes.NONE)
|
||||||
|
OnHoverResize(type);
|
||||||
handledInstanceThisFrame = true;
|
handledInstanceThisFrame = true;
|
||||||
}
|
}
|
||||||
else if (WasHoveringResize)
|
else if (WasHoveringResize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user