AutoCompleteclass

objectMenuAutoComplete
Namespace
Editor
Assembly
Sandbox.Tools
Declaration
public class Editor.AutoComplete : Editor.Menu

Constructors1

Showing 1 constructors

Methods6

Showing 6 methods

public virtual Editor.Option AddOption(string name, string icon = null, System.Action action = null, string shortcut = null)PUBLICVIRTUAL

Add an option for this autocomplete

ParameterTypeDescription
namestring
icon = nullstring
action = nullAction
shortcut = nullstring
Returns:Option

public void OnAutoComplete(string newPrefix, Vector2 screenPosition)PUBLIC

ParameterTypeDescription
newPrefixstring
screenPositionVector2
Returns:void

public void OnGlobalMousePressed()PUBLIC

Called when the mouse is pressed. Will hide this window if we clicked on anything except ourselves or our parent control.

Returns:void

public void OnParentBlur()PUBLIC

Call this when the widget that spawns this blurs, so we can hide ourself

Returns:void

public void OnParentKeyPress(Editor.KeyEvent e)PUBLIC

You should call this from the parent when a key is pressed. Will forward the appropriate keys to us and accept the event.

ParameterTypeDescription
eKeyEvent
Returns:void

public void OpenAbove(Vector2 position)PUBLIC

Open above this position

ParameterTypeDescription
positionVector2
Returns:void

Properties3

Showing 3 properties

public bool Editor.AutoComplete.HasAutocompleteOptions { get; set; }PUBLICGETSET

Returns:bool

public int Editor.AutoComplete.MinimumLength { get; set; }PUBLICGETSET

Returns:int

On this page