Beispiel #1
0
 private void DrawDatabaseHeader()
 {
     EditorGUILayout.BeginHorizontal();
     EditorGUILayout.LabelField("Dialogue Databases", EditorStyles.boldLabel);
     GUILayout.FlexibleSpace();
     if (GUILayout.Button("All", EditorStyles.miniButtonLeft, GUILayout.Width(48)))
     {
         if (EditorUtility.DisplayDialog("Add All Databases in Project",
                                         string.Format("Do you want to find and add all dialogue databases in the entire project?", EditorWindowTools.GetCurrentDirectory()),
                                         "Ok", "Cancel"))
         {
             AddAllDatabasesInProject();
         }
     }
     if (GUILayout.Button("Folder", EditorStyles.miniButtonMid, GUILayout.Width(48)))
     {
         if (EditorUtility.DisplayDialog("Add All Databases in Folder",
                                         string.Format("Do you want to find and add all dialogue databases in the folder {0}?", EditorWindowTools.GetCurrentDirectory()),
                                         "Ok", "Cancel"))
         {
             AddAllDatabasesInFolder(EditorWindowTools.GetCurrentDirectory(), false);
         }
     }
     if (GUILayout.Button("+", EditorStyles.miniButtonRight, GUILayout.Width(22)))
     {
         prefs.databases.Add(null);
     }
     EditorGUILayout.EndHorizontal();
 }