UnityEditor.EditorUtility.ResetMouseDown C# (CSharp) Method

ResetMouseDown() static private method

static private ResetMouseDown ( ) : void
return void
        internal static void ResetMouseDown()
        {
            Tools.s_ButtonDown = -1;
            GUIUtility.hotControl = 0;
        }

Usage Example

示例#1
0
        public static void DisplayPopupMenu(Rect position, string menuItemPath, MenuCommand command)
        {
            if (menuItemPath == "CONTEXT" || menuItemPath == "CONTEXT/" || menuItemPath == "CONTEXT\\")
            {
                bool flag = false;
                if (command == null)
                {
                    flag = true;
                }
                if (command != null && command.context == null)
                {
                    flag = true;
                }
                if (flag)
                {
                    Debug.LogError("DisplayPopupMenu: invalid arguments: using CONTEXT requires a valid MenuCommand object. If you want a custom context menu then try using the GenericMenu.");
                    return;
                }
            }
            Vector2 vector = GUIUtility.GUIToScreenPoint(new Vector2(position.x, position.y));

            position.x = vector.x;
            position.y = vector.y;
            EditorUtility.Internal_DisplayPopupMenu(position, menuItemPath, (command != null) ? command.context : null, (command != null) ? command.userData : 0);
            EditorUtility.ResetMouseDown();
        }
All Usage Examples Of UnityEditor.EditorUtility::ResetMouseDown
EditorUtility