DeveloperConsole.DrawAutocompleteWindow C# (CSharp) Метод

DrawAutocompleteWindow() публичный Метод

public DrawAutocompleteWindow ( string title, string names, Vector2 offset, int selectedIndex, int windowIndex ) : void
title string
names string
offset Vector2
selectedIndex int
windowIndex int
Результат void
	void DrawAutocompleteWindow(string title, string[] names, Vector2 offset, int selectedIndex, int windowIndex)
	{
		autocompleteScrollPos[windowIndex] = GUI.BeginScrollView(new Rect(offset.x + autocompleteScrollBarBuffer, offset.y, autocompleteBoxMaxSize.x + autocompleteScrollBarBuffer, autocompleteBoxMaxSize.y), autocompleteScrollPos[windowIndex], new Rect(0f, 0f, autocompleteBoxMaxSize.x + autocompleteScrollBarBuffer, names.Length * autocompleteButtonHeight), false, false);
		GUI.Box(new Rect(0f, 0f, autocompleteBoxMaxSize.x, autocompleteTitleHeight + autocompleteBoxBottomPadding + names.Length * autocompleteButtonHeight), "");
		GUIStyle titleStyle = new GUIStyle(GUI.skin.GetStyle("Label"));
		titleStyle.alignment = TextAnchor.UpperCenter;
		GUI.Label(new Rect(0f, 0f, autocompleteBoxMaxSize.x, autocompleteTitleHeight), title, titleStyle);
		
		for (int i = 0; i < names.Length; i++)
		{
			Color prevColor = GUI.color;
			if (selectedIndex == i)
			{
				GUI.color = autocompleteSelectedColor;
			}
			
			if (GUI.Button(new Rect(0f, autocompleteTitleHeight + i * autocompleteButtonHeight, autocompleteBoxMaxSize.x, autocompleteButtonHeight), names[i]))
			{
				autocompleteWindowIndex = windowIndex;
				autocompleteIndex = i;
				ApplyAutocompleteText();
			}
			
			if (selectedIndex == i)
			{
				GUI.color = prevColor;
			}
		}
		GUI.EndScrollView();
	}
	

Same methods

DeveloperConsole::DrawAutocompleteWindow ( string title, string names, Vector2 offset, int selectedIndex ) : void