示例#1
0
        public static void Launch(VariablesEditor editor, ReorderableList list)
        {
            if (instance == null)
            {
                instance = CreateInstance <AddVariableWindow>();
            }
            instance.titleContent = new GUIContent("Add Variable");
            instance.list         = list;
            instance.editor       = editor;
            instance.ShowUtility();
            instance.Focus();

            var size = new Vector2(200, 110);

            instance.minSize = size;
            instance.maxSize = size;

            var rect = instance.position;

            rect.size         = size;
            rect.center       = GUIUtility.GUIToScreenPoint(XEvent.MousePos);
            instance.position = rect;
        }
示例#2
0
 void OnAdd(ReorderableList list)
 {
     AddVariableWindow.Launch(this, list);
 }