public class Editor.AdvancedDropdownWidget : Editor.Widget
A generic sliding hierarchical selector widget. Build a tree of `Editor.AdvancedDropdownItem` and hand it to this widget.
Constructors
Showing 1 constructors
public AdvancedDropdownWidget(Editor.Widget parent)
No results match this filter.
Methods
Showing 7 methods
protected virtual void BuildPanel(Editor.AdvancedDropdownWidget.AdvancedDropdownPanel panel)
Build a panel's content from the item tree. Override to customize.
protected virtual void OnBuildSearchResults(Editor.AdvancedDropdownWidget.AdvancedDropdownPanel panel, string searchText)
Called after search results are populated. Override to add extra entries (e.g. "New Component" button).
protected virtual void OnKeyRelease(Editor.KeyEvent e)
protected virtual void OnPaint()
public void PopPanel()
Pop the current panel (navigate back).
protected void PushPanel(Editor.AdvancedDropdownWidget.AdvancedDropdownPanel panel)
Push a new panel onto the stack (navigate deeper into a category).
public void Rebuild()
Rebuild the item tree and reset to the root panel.
No results match this filter.
Properties
Showing 13 properties
public Vector2 Editor.AdvancedDropdownWidget.ContentSize { get; set; }
Fixed size of the content area (below the search bar).
public Editor.Widget Editor.AdvancedDropdownWidget.FilterWidget { get; set; }
Optional filter widget placed next to the search bar (e.g. a settings button).
protected bool Editor.AdvancedDropdownWidget.IsSearching { get; set; }
Whether the user is currently searching.
protected bool Editor.AdvancedDropdownWidget.IsTextInputActive { get; set; }
For subclasses that have a text input inside the panel (e.g. a name field) - set to true to prevent Left arrow key from popping the panel.
protected Editor.Widget Editor.AdvancedDropdownWidget.Main { get; set; }
public System.Action`1<Editor.AdvancedDropdownItem> Editor.AdvancedDropdownWidget.OnBuildItems { get; set; }
Called to (re)build the item tree. Receives `Editor.AdvancedDropdownWidget.RootItem` after it has been cleared.
public System.Action Editor.AdvancedDropdownWidget.OnFinished { get; set; }
Called after selection to allow the host to close/cleanup.
public System.Action`1<object> Editor.AdvancedDropdownWidget.OnSelect { get; set; }
Called when a leaf item is selected. Receives the item's `Editor.AdvancedDropdownItem.Value`.
public Editor.AdvancedDropdownItem Editor.AdvancedDropdownWidget.RootItem { get; set; }
The root of the item tree. Populated by `Editor.AdvancedDropdownWidget.OnBuildItems` or set directly.
public string Editor.AdvancedDropdownWidget.RootTitle { get; set; }
Title shown in the root panel header.
public Editor.LineEdit Editor.AdvancedDropdownWidget.Search { get; set; }
public string Editor.AdvancedDropdownWidget.SearchPlaceholderText { get; set; }
Placeholder text shown in the search bar.
public System.Func`3<Editor.AdvancedDropdownItem,string[],int> Editor.AdvancedDropdownWidget.SearchScorer { get; set; }
Optional custom search scorer. Receives an item and the search words, returns a score (0 = no match). If null, the default scorer matches against Title and Description.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.AdvancedDropdownWidget |