s&box docs

public class Editor.AutoComplete : Editor.Menu

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

Showing 6 methods

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

Add an option for this autocomplete

Parameters

  • icon: Default: null
  • action: Default: null
  • shortcut: Default: null

public void OnAutoComplete(string newPrefix, Vector2 screenPosition)

public void OnGlobalMousePressed()

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

public void OnParentBlur()

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

public void OnParentKeyPress(Editor.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.

public void OpenAbove(Vector2 position)

Open above this position

Properties

Showing 3 properties

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

Metadata

FieldValue
NamespaceEditor
Typeclass
AssemblySandbox.Tools
Doc IDT:Editor.AutoComplete

On this page