public void Init(CreateNewClientWindow window)
 {
     this.window              = window;
     this.window.minSize      = this.window.maxSize = new Vector2(250, 100);
     this.window.titleContent = new GUIContent("Add Clients");
     this.window.ShowUtility();
 }
예제 #2
0
        private void DrawMenuBar(Rect rect)
        {
            GUILayout.BeginArea(rect, EditorStyles.toolbar);
            using (new EditorGUILayout.HorizontalScope())
            {
                if (ToolbarButton(new GUIContent("New")))
                {
                    CreateNewClientWindow window = new CreateNewClientWindow();
                    window.Init(window);
                }
                GUILayout.Space(5);

                if (ToolbarButton(new GUIContent("Save")))
                {
                    //if(currentClient != null){
                    //    byte[] newData = ProjectAsset.GetData()
                    //
                    //    if(currentClient.configuration.Equals(newData))
                    //    {
                    //        currentClient.configuration = newData;
                    //        EditorUtility.SetDirty((UtilityAIAsset)currentClient);
                    //    }
                    //
                    //    //Debug.Log("Saving");
                    //}
                    Debug.Log("Save");
                }
                GUILayout.Space(5);

                if (ToolbarButton(new GUIContent("Load")))
                {
                    UpdateClientList();
                    clientList.ShowAsContext();
                }
                //GUILayout.Space(5);
                //if (ToolbarButton(new GUIContent("Reload"))){
                //    //container = new ContainerNode();
                //}
            }
            GUILayout.EndArea();
        }