Api Editor AdvancedDropdownWidget
class

AdvancedDropdownWidget

public class AdvancedDropdownWidget : Widget

A generic sliding hierarchical selector widget. Build a tree of AdvancedDropdownItem and hand it to this widget.

Constructors

AdvancedDropdownWidget(Widget parent)

Properties

Name Type Description
OnSelect Action<Object> Called when a leaf item is selected. Receives the item's Value.
OnFinished Action Called after selection to allow the host to close/cleanup.
SearchPlaceholderText String Placeholder text shown in the search bar.
RootTitle String Title shown in the root panel header.
ContentSize Vector2 Fixed size of the content area (below the search bar).
RootItem AdvancedDropdownItem The root of the item tree. Populated by OnBuildItems or set directly.
OnBuildItems Action<AdvancedDropdownItem> Called to (re)build the item tree. Receives RootItem after it has been cleared.
SearchScorer Func<AdvancedDropdownItem, String[], Int32> 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.
FilterWidget Widget Optional filter widget placed next to the search bar (e.g. a settings button).
Search LineEdit

Methods

Void Rebuild()

Rebuild the item tree and reset to the root panel.

Void PopPanel()

Pop the current panel (navigate back).

Assembly: Sandbox.Tools Namespace: Editor Full Name: Editor.AdvancedDropdownWidget