ReorderableListControlDrawEmpty Delegate |
Namespace: Rotorz.ReorderableList
public delegate void DrawEmpty()
Callback should make use of GUILayout to present controls.
The following listing displays a label for empty list control:
using Rotorz.ReorderableList; using System.Collections.Generic; using UnityEditor; using UnityEngine; public class ExampleWindow : EditorWindow { private List<string> _list; private void OnEnable() { _list = new List<string>(); } private void OnGUI() { ReorderableListGUI.ListField(_list, ReorderableListGUI.TextFieldItemDrawer, DrawEmptyMessage); } private string DrawEmptyMessage() { GUILayout.Label("List is empty!", EditorStyles.miniLabel); } }