class
AutoComplete
public class AutoComplete : Menu Constructors
AutoComplete(Widget parent) Properties
| Name | Type | Description |
|---|---|---|
HasAutocompleteOptions | Boolean | |
MinimumLength | Int32 | |
OpenOffset | Vector2 |
Methods
Void OnAutoComplete(String newPrefix, Vector2 screenPosition) virtual Option AddOption(String name, String icon = null, Action action = null, String shortcut = null) Add an option for this autocomplete
Void OpenAbove(Vector2 position) Open above this position
Void OnParentKeyPress(KeyEvent e) You should call this from the parent when a key is pressed. Will forward the appropriate keys to us and accept the event.
Void OnParentBlur() Call this when the widget that spawns this blurs, so we can hide ourself
Void OnGlobalMousePressed() Called when the mouse is pressed. Will hide this window if we clicked on anything except ourselves or our parent control.
Fields
| Name | Type | Description |
|---|---|---|
OnBuildOptions | Action<Menu, String> | The text has changed - fill in the options |
OnOptionSelected | Action<String> | You should hook this up to change the text on your control |