mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-17 14:37:49 +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)
|
if (!MainCamera)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
PanelDragger.ForceEnd();
|
||||||
|
|
||||||
Mode = mode;
|
Mode = mode;
|
||||||
Inspecting = true;
|
Inspecting = true;
|
||||||
UIManager.NavBarRect.gameObject.SetActive(false);
|
UIManager.NavBarRect.gameObject.SetActive(false);
|
||||||
|
@ -17,6 +17,20 @@ namespace UnityExplorer.UI.Panels
|
|||||||
|
|
||||||
public static bool Resizing { get; private set; }
|
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>();
|
internal static List<PanelDragger> Instances = new List<PanelDragger>();
|
||||||
|
|
||||||
static PanelDragger()
|
static PanelDragger()
|
||||||
@ -82,7 +96,6 @@ namespace UnityExplorer.UI.Panels
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public static bool ResizePrompting => s_resizeCursorObj && s_resizeCursorObj.activeSelf;
|
|
||||||
public static GameObject s_resizeCursorObj;
|
public static GameObject s_resizeCursorObj;
|
||||||
|
|
||||||
internal static bool wasAnyDragging;
|
internal static bool wasAnyDragging;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user