Class ScyllaSearchablePopup
A dropdown popup offering a filtered, keyboard-navigable list of items.
Inherited Members
Namespace: Scylla.Core.Editor
Assembly: ScyllaCore.Editor.dll
Syntax
public sealed class ScyllaSearchablePopup : EditorWindow
Remarks
Shown with ShowAsDropDown, so it dismisses on focus loss like any other Unity
dropdown. The caller supplies the whole unfiltered list up front and a callback for
the pick. There is no way to replace the list once shown, and no cancel callback: a
popup dismissed without a pick simply never invokes it.
Filtering is a case-insensitive substring match against Label only, and always resets the selection to the first surviving row. Arrow keys move the selection, Return or Enter picks (falling back to the first row when nothing is selected), and Escape closes without picking.
The popup sizes itself to its content between a floor and a ceiling, so a three-item menu does not open as a mostly-empty full-height panel.
Methods
Show(Rect, string, List<Item>, Action<Item>, long)
Shows the popup as a dropdown anchored to a screen rect.
Declaration
public static void Show(Rect activatorRect, string title, List<ScyllaSearchablePopup.Item> items, Action<ScyllaSearchablePopup.Item> onPick, long filterDebounceMs = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | activatorRect | The screen-space anchor rect. |
| string | title | The window title. |
| List<ScyllaSearchablePopup.Item> | items | The selectable items. |
| Action<ScyllaSearchablePopup.Item> | onPick | Invoked with the picked item. Never invoked if the popup is dismissed. |
| long | filterDebounceMs | How long to wait after a keystroke before re-filtering. Zero filters as fast as the scheduler allows, which is right for a menu of a few dozen entries. Raise it for a catalog of thousands, where filtering every keystroke is felt. |