AddShelf() публичный статический Метод

public static AddShelf ( string shelfName, string shelfPath ) : HEU_Shelf
shelfName string
shelfPath string
Результат HEU_Shelf
		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();
				}
			}
		}
Пример #2
0
	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();
		}
	    }
	}