public static AddShelf ( string shelfName, string shelfPath ) : |
||
shelfName | string | |
shelfPath | string | |
return |
public void OnGUI() { using (new GUILayout.VerticalScope()) { _shelfName = EditorGUILayout.TextField("New Shelf Name", _shelfName); using (new EditorGUI.DisabledScope(string.IsNullOrEmpty(_shelfName))) { if (GUILayout.Button("Create")) { //Debug.Log("Shelf name: " + _shelfName); HEU_ShelfTools.AddShelf(_shelfName, _shelfPath); HEU_ShelfTools.SaveShelf(); HEU_ShelfTools.SetReloadShelves(); this.Close(); } } if (GUILayout.Button("Cancel")) { this.Close(); } } }
public void OnGUI() { using (new GUILayout.VerticalScope()) { _shelfName = EditorGUILayout.TextField("New Shelf Name", _shelfName); using (new EditorGUI.DisabledScope(string.IsNullOrEmpty(_shelfName) || _shelfName.Trim().Length == 0)) { if (GUILayout.Button("Create")) { //HEU_Logger.Log("Shelf name: " + _shelfName); HEU_Shelf newShelf = HEU_ShelfTools.AddShelf(_shelfName, _shelfPath); if (newShelf != null) { HEU_ShelfTools.SaveShelf(); HEU_ShelfTools.SetReloadShelves(); this.Close(); } else { HEU_Logger.LogError("Invalid Shelf! Please check if the name or path is valid."); } } } if (GUILayout.Button("Cancel")) { this.Close(); } } }