GetNumShelves() public static method

public static GetNumShelves ( ) : int
return int
コード例 #1
0
		private void SelectShelf(int index)
		{
			int numShelves = HEU_ShelfTools.GetNumShelves();
			if(index >= 0 && index < numShelves)
			{
				HEU_Shelf shelf = HEU_ShelfTools.GetShelf(index);
				if (shelf != null)
				{
					int numTools = shelf._tools.Count;
					_guiContents = new GUIContent[numTools];

					for (int i = 0; i < numTools; ++i)
					{
						_guiContents[i] = new GUIContent();
						_guiContents[i].text = shelf._tools[i]._name;

						if (HEU_HAPIUtility.DoesMappedPathExist(shelf._tools[i]._iconPath))
						{
							string realPath = HEU_PluginStorage.Instance.ConvertEnvKeyedPathToReal(shelf._tools[i]._iconPath);
							_guiContents[i].image = HEU_GeneralUtility.LoadTextureFromFile(realPath);
						}
						
						_guiContents[i].tooltip = shelf._tools[i]._toolTip;
					}
				}
			}
		}
コード例 #2
0
		private void SelectShelf(int index)
		{
			int numShelves = HEU_ShelfTools.GetNumShelves();
			if(index >= 0 && index < numShelves)
			{
				HEU_Shelf shelf = HEU_ShelfTools.GetShelf(index);
				if (shelf != null)
				{
					int numTools = shelf._tools.Count;
					_guiContents = new GUIContent[numTools];

					for (int i = 0; i < numTools; ++i)
					{
						_guiContents[i] = new GUIContent();
						_guiContents[i].text = shelf._tools[i]._name;

						if (HEU_Platform.DoesFileExist(shelf._tools[i]._iconPath))
						{
							_guiContents[i].image = HEU_GeneralUtility.LoadTextureFromFile(shelf._tools[i]._iconPath);
						}
						
						_guiContents[i].tooltip = shelf._tools[i]._toolTip;
					}
				}
			}
		}
コード例 #3
0
		private void LoadShelves()
		{
			HEU_ShelfTools.ClearShelves();
			HEU_ShelfTools.LoadShelves();

			int numShelves = HEU_ShelfTools.GetNumShelves();
			_shelfNames = new string[numShelves];
			for(int i = 0; i < numShelves; ++i)
			{
				_shelfNames[i] = HEU_ShelfTools.GetShelf(i)._shelfName;
			}

			SelectShelf(HEU_ShelfTools.GetCurrentShelfIndex());

			_selectedToolIndex = -1;
		}