protected SerializableReorderableList(ReorderableListState state, SerializedProperty elements, string title = "Reorderable List") { this.elements = elements; Initialize(state, title); Undo.undoRedoPerformed += delegate { SerializedObject.Update(); SerializedObject.ApplyModifiedProperties(); Refresh(); }; }
internal void Initialize(ReorderableListState state, string title) { Title = title; if (state == null) { state = new ReorderableListState(); } this.state = state; treeView = new ReorderableListTreeView(this, state.TreeViewState); searchBar = new SearchField(); searchBar.downOrUpArrowKeyPressed += treeView.SetFocusAndEnsureSelectedItem; InitializeTreeViewCallbacks(); }
protected NonSerializableReorderableList(ReorderableListState state, List <TElement> elements, string title = "Reorderable List") { this.elements = elements; Initialize(state, title); }