mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 22:27:45 +08:00
Force stop panel drag/resize when starting Inspect Under Mouse
This commit is contained in:
parent
83f15c7168
commit
cccd02255f
@ -71,6 +71,8 @@ namespace UnityExplorer.UI.Inspectors
|
||||
if (!MainCamera)
|
||||
return;
|
||||
|
||||
PanelDragger.ForceEnd();
|
||||
|
||||
Mode = mode;
|
||||
Inspecting = true;
|
||||
UIManager.NavBarRect.gameObject.SetActive(false);
|
||||
|
@ -17,6 +17,20 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
public static bool Resizing { get; private set; }
|
||||
|
||||
public static bool ResizePrompting => s_resizeCursorObj && s_resizeCursorObj.activeSelf;
|
||||
|
||||
internal static void ForceEnd()
|
||||
{
|
||||
s_resizeCursorObj.SetActive(false);
|
||||
wasAnyDragging = false;
|
||||
|
||||
foreach (var instance in Instances)
|
||||
{
|
||||
instance.WasDragging = false;
|
||||
instance.WasResizing = false;
|
||||
}
|
||||
}
|
||||
|
||||
internal static List<PanelDragger> Instances = new List<PanelDragger>();
|
||||
|
||||
static PanelDragger()
|
||||
@ -82,7 +96,6 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
#endregion
|
||||
|
||||
public static bool ResizePrompting => s_resizeCursorObj && s_resizeCursorObj.activeSelf;
|
||||
public static GameObject s_resizeCursorObj;
|
||||
|
||||
internal static bool wasAnyDragging;
|
||||
|
Loading…
x
Reference in New Issue
Block a user