Wiki > AutoComplete TextField

AutoCompleteTextField class


Class that handles all the AutoComplete and draw logic.

Namespace: RotaryHeart.Lib.AutoComplete
Package: AutoComplete TextField

Syntax


public class AutoCompleteTextField : UnityEditor.EditorWindow

Classes


Accessibility Level Name Description
public EditorGUILayout Uses UnityEditor.EditorGUILayout to draw the text field.
public EditorGUI Uses UnityEditor.EditorGUI to draw the text field

Properties


Accessibility Level Type Name Description
public static float WindowMaxHeight Height for the dropdown window.
public static Color backgroundColor Background rectangle color.
private static AutoCompleteTextField reference Used to ensure only 1 auto complete window is displayed.
private static Vector2 oldPosition This is to prevent saving the return value to the wrong UI element.
private static GUIContent returnedContent Saves the returned value (if any was selected).
private static bool returnedValue Indicates if a value most be returned.
private Vector2 scrollPosition If the list of elements is big enough this saves the scroll position.
private Rect scrollViewContent Rect for the scroll view content.
private Rect autoCompleteRect Rect for the window.
private string[] entreis Entries for the auto complete window.
private string input Input to show on text field.

Methods


Accessibility Level Type Name Description
public static string _AutoCompleteLogic(Rect, GUIContent, string, string[], string) Logic for the auto complete draw on text field focus.
public static void CheckReference(Rect) Used to check if a window has been already initialized.
public void OnGUI() Called by Unity.
public void DoWindowUpdated() Actual draw of the window logic.

See also