Class ReorderableListGUI
Utility class for drawing reorderable lists.
Inherited Members
Namespace: Unity.VisualScripting.ReorderableList
Assembly: Unity.VisualScripting.Core.Editor.dll
Syntax
public static class ReorderableListGUI
Fields
DefaultItemHeight
Default list item height is 18 pixels.
Declaration
public const float DefaultItemHeight = 18
Field Value
| Type | Description |
|---|---|
| float |
Properties
CurrentItemIndex
Gets the zero-based index of the list item that is currently being drawn; or a value of -1 if no item is currently being drawn.
Declaration
public static int CurrentItemIndex { get; }
Property Value
| Type | Description |
|---|---|
| int |
CurrentItemTotalPosition
Gets the total position of the list item that is currently being drawn.
Declaration
public static Rect CurrentItemTotalPosition { get; }
Property Value
| Type | Description |
|---|---|
| Rect |
Remarks
The value of this property should be ignored for Layout type events when using reorderable list controls with automatic layout.
See Also
CurrentListControlID
Gets the control ID of the list that is currently being drawn.
Declaration
public static int CurrentListControlID { get; }
Property Value
| Type | Description |
|---|---|
| int |
CurrentListPosition
Gets the position of the list control that is currently being drawn.
Declaration
public static Rect CurrentListPosition { get; }
Property Value
| Type | Description |
|---|---|
| Rect |
Remarks
The value of this property should be ignored for Layout type events when using reorderable list controls with automatic layout.
See Also
IndexOfChangedItem
Gets or sets the zero-based index of the last item that was changed. A value of -1 indicates that no item was changed by list.
Declaration
public static int IndexOfChangedItem { get; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
This property should not be set when items are added or removed.
Methods
CalculateListFieldHeight(int)
Calculate height of list field for absolute positioning.
Declaration
public static float CalculateListFieldHeight(int itemCount)
Parameters
| Type | Name | Description |
|---|---|---|
| int | itemCount | Count of items in list. |
Returns
| Type | Description |
|---|---|
| float | Required list height in pixels. |
CalculateListFieldHeight(int, float)
Calculate height of list field for absolute positioning.
Declaration
public static float CalculateListFieldHeight(int itemCount, float itemHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| int | itemCount | Count of items in list. |
| float | itemHeight | Fixed height of list item. |
Returns
| Type | Description |
|---|---|
| float | Required list height in pixels. |
CalculateListFieldHeight(int, float, ReorderableListFlags)
Calculate height of list field for absolute positioning.
Declaration
public static float CalculateListFieldHeight(int itemCount, float itemHeight, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| int | itemCount | Count of items in list. |
| float | itemHeight | Fixed height of list item. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Returns
| Type | Description |
|---|---|
| float | Required list height in pixels. |
CalculateListFieldHeight(int, ReorderableListFlags)
Calculate height of list field for absolute positioning.
Declaration
public static float CalculateListFieldHeight(int itemCount, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| int | itemCount | Count of items in list. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Returns
| Type | Description |
|---|---|
| float | Required list height in pixels. |
CalculateListFieldHeight(IReorderableListAdaptor)
Calculate height of list field for adapted collection.
Declaration
public static float CalculateListFieldHeight(IReorderableListAdaptor adaptor)
Parameters
| Type | Name | Description |
|---|---|---|
| IReorderableListAdaptor | adaptor | Reorderable list adaptor. |
Returns
| Type | Description |
|---|---|
| float | Required list height in pixels. |
CalculateListFieldHeight(IReorderableListAdaptor, ReorderableListFlags)
Calculate height of list field for adapted collection.
Declaration
public static float CalculateListFieldHeight(IReorderableListAdaptor adaptor, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| IReorderableListAdaptor | adaptor | Reorderable list adaptor. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Returns
| Type | Description |
|---|---|
| float | Required list height in pixels. |
CalculateListFieldHeight(SerializedProperty)
Calculate height of list field for absolute positioning.
Declaration
public static float CalculateListFieldHeight(SerializedProperty arrayProperty)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | arrayProperty | Serializable property. |
Returns
| Type | Description |
|---|---|
| float | Required list height in pixels. |
CalculateListFieldHeight(SerializedProperty, ReorderableListFlags)
Calculate height of list field for absolute positioning.
Declaration
public static float CalculateListFieldHeight(SerializedProperty arrayProperty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | arrayProperty | Serializable property. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Returns
| Type | Description |
|---|---|
| float | Required list height in pixels. |
DefaultItemDrawer<T>(Rect, T)
Default list item drawer implementation.
Declaration
public static T DefaultItemDrawer<T>(Rect position, T item)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position to draw list item control(s). |
| T | item | Value of list item. |
Returns
| Type | Description |
|---|---|
| T | Unmodified value of list item. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
Remarks
Always presents the label "Item drawer not implemented.".
ListField(IReorderableListAdaptor)
Draw list field control for adapted collection.
Declaration
public static void ListField(IReorderableListAdaptor adaptor)
Parameters
| Type | Name | Description |
|---|---|---|
| IReorderableListAdaptor | adaptor | Reorderable list adaptor. |
ListField(IReorderableListAdaptor, DrawEmpty)
Draw list field control for adapted collection.
Declaration
public static void ListField(IReorderableListAdaptor adaptor, ReorderableListControl.DrawEmpty drawEmpty)
Parameters
| Type | Name | Description |
|---|---|---|
| IReorderableListAdaptor | adaptor | Reorderable list adaptor. |
| ReorderableListControl.DrawEmpty | drawEmpty | Callback to draw custom content for empty list (optional). |
ListField(IReorderableListAdaptor, DrawEmpty, ReorderableListFlags)
Draw list field control for adapted collection.
Declaration
public static void ListField(IReorderableListAdaptor adaptor, ReorderableListControl.DrawEmpty drawEmpty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| IReorderableListAdaptor | adaptor | Reorderable list adaptor. |
| ReorderableListControl.DrawEmpty | drawEmpty | Callback to draw custom content for empty list (optional). |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListField(IReorderableListAdaptor, ReorderableListFlags)
Draw list field control for adapted collection.
Declaration
public static void ListField(IReorderableListAdaptor adaptor, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| IReorderableListAdaptor | adaptor | Reorderable list adaptor. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListField(SerializedProperty)
Draw list field control for serializable property array.
Declaration
public static void ListField(SerializedProperty arrayProperty)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | arrayProperty | Serializable property. |
ListField(SerializedProperty, float)
Draw list field control for serializable property array.
Declaration
public static void ListField(SerializedProperty arrayProperty, float fixedItemHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | arrayProperty | Serializable property. |
| float | fixedItemHeight | Use fixed height for items rather than GetPropertyHeight(SerializedProperty). |
ListField(SerializedProperty, float, DrawEmpty)
Draw list field control for serializable property array.
Declaration
public static void ListField(SerializedProperty arrayProperty, float fixedItemHeight, ReorderableListControl.DrawEmpty drawEmpty)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | arrayProperty | Serializable property. |
| float | fixedItemHeight | Use fixed height for items rather than GetPropertyHeight(SerializedProperty). |
| ReorderableListControl.DrawEmpty | drawEmpty | Callback to draw custom content for empty list (optional). |
ListField(SerializedProperty, float, DrawEmpty, ReorderableListFlags)
Draw list field control for serializable property array.
Declaration
public static void ListField(SerializedProperty arrayProperty, float fixedItemHeight, ReorderableListControl.DrawEmpty drawEmpty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | arrayProperty | Serializable property. |
| float | fixedItemHeight | Use fixed height for items rather than GetPropertyHeight(SerializedProperty). |
| ReorderableListControl.DrawEmpty | drawEmpty | Callback to draw custom content for empty list (optional). |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListField(SerializedProperty, float, ReorderableListFlags)
Draw list field control for serializable property array.
Declaration
public static void ListField(SerializedProperty arrayProperty, float fixedItemHeight, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | arrayProperty | Serializable property. |
| float | fixedItemHeight | Use fixed height for items rather than GetPropertyHeight(SerializedProperty). |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListField(SerializedProperty, DrawEmpty)
Draw list field control for serializable property array.
Declaration
public static void ListField(SerializedProperty arrayProperty, ReorderableListControl.DrawEmpty drawEmpty)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | arrayProperty | Serializable property. |
| ReorderableListControl.DrawEmpty | drawEmpty | Callback to draw custom content for empty list (optional). |
ListField(SerializedProperty, DrawEmpty, ReorderableListFlags)
Draw list field control for serializable property array.
Declaration
public static void ListField(SerializedProperty arrayProperty, ReorderableListControl.DrawEmpty drawEmpty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | arrayProperty | Serializable property. |
| ReorderableListControl.DrawEmpty | drawEmpty | Callback to draw custom content for empty list (optional). |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListField(SerializedProperty, ReorderableListFlags)
Draw list field control for serializable property array.
Declaration
public static void ListField(SerializedProperty arrayProperty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | arrayProperty | Serializable property. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListFieldAbsolute(Rect, IReorderableListAdaptor)
Draw list field control for adapted collection.
Declaration
public static void ListFieldAbsolute(Rect position, IReorderableListAdaptor adaptor)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IReorderableListAdaptor | adaptor | Reorderable list adaptor. |
ListFieldAbsolute(Rect, IReorderableListAdaptor, DrawEmptyAbsolute)
Draw list field control for adapted collection.
Declaration
public static void ListFieldAbsolute(Rect position, IReorderableListAdaptor adaptor, ReorderableListControl.DrawEmptyAbsolute drawEmpty)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IReorderableListAdaptor | adaptor | Reorderable list adaptor. |
| ReorderableListControl.DrawEmptyAbsolute | drawEmpty | Callback to draw custom content for empty list (optional). |
ListFieldAbsolute(Rect, IReorderableListAdaptor, DrawEmptyAbsolute, ReorderableListFlags)
Draw list field control for adapted collection.
Declaration
public static void ListFieldAbsolute(Rect position, IReorderableListAdaptor adaptor, ReorderableListControl.DrawEmptyAbsolute drawEmpty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IReorderableListAdaptor | adaptor | Reorderable list adaptor. |
| ReorderableListControl.DrawEmptyAbsolute | drawEmpty | Callback to draw custom content for empty list (optional). |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListFieldAbsolute(Rect, IReorderableListAdaptor, ReorderableListFlags)
Draw list field control for adapted collection.
Declaration
public static void ListFieldAbsolute(Rect position, IReorderableListAdaptor adaptor, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IReorderableListAdaptor | adaptor | Reorderable list adaptor. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListFieldAbsolute(Rect, SerializedProperty)
Draw list field control for serializable property array.
Declaration
public static void ListFieldAbsolute(Rect position, SerializedProperty arrayProperty)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| SerializedProperty | arrayProperty | Serializable property. |
ListFieldAbsolute(Rect, SerializedProperty, float)
Draw list field control for serializable property array.
Declaration
public static void ListFieldAbsolute(Rect position, SerializedProperty arrayProperty, float fixedItemHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| SerializedProperty | arrayProperty | Serializable property. |
| float | fixedItemHeight | Use fixed height for items rather than GetPropertyHeight(SerializedProperty). |
ListFieldAbsolute(Rect, SerializedProperty, float, DrawEmptyAbsolute)
Draw list field control for serializable property array.
Declaration
public static void ListFieldAbsolute(Rect position, SerializedProperty arrayProperty, float fixedItemHeight, ReorderableListControl.DrawEmptyAbsolute drawEmpty)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| SerializedProperty | arrayProperty | Serializable property. |
| float | fixedItemHeight | Use fixed height for items rather than GetPropertyHeight(SerializedProperty). |
| ReorderableListControl.DrawEmptyAbsolute | drawEmpty | Callback to draw custom content for empty list (optional). |
ListFieldAbsolute(Rect, SerializedProperty, float, DrawEmptyAbsolute, ReorderableListFlags)
Draw list field control for serializable property array.
Declaration
public static void ListFieldAbsolute(Rect position, SerializedProperty arrayProperty, float fixedItemHeight, ReorderableListControl.DrawEmptyAbsolute drawEmpty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| SerializedProperty | arrayProperty | Serializable property. |
| float | fixedItemHeight | Use fixed height for items rather than GetPropertyHeight(SerializedProperty). |
| ReorderableListControl.DrawEmptyAbsolute | drawEmpty | Callback to draw custom content for empty list (optional). |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListFieldAbsolute(Rect, SerializedProperty, float, ReorderableListFlags)
Draw list field control for serializable property array.
Declaration
public static void ListFieldAbsolute(Rect position, SerializedProperty arrayProperty, float fixedItemHeight, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| SerializedProperty | arrayProperty | Serializable property. |
| float | fixedItemHeight | Use fixed height for items rather than GetPropertyHeight(SerializedProperty). |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListFieldAbsolute(Rect, SerializedProperty, DrawEmptyAbsolute)
Draw list field control for serializable property array.
Declaration
public static void ListFieldAbsolute(Rect position, SerializedProperty arrayProperty, ReorderableListControl.DrawEmptyAbsolute drawEmpty)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| SerializedProperty | arrayProperty | Serializable property. |
| ReorderableListControl.DrawEmptyAbsolute | drawEmpty | Callback to draw custom content for empty list (optional). |
ListFieldAbsolute(Rect, SerializedProperty, DrawEmptyAbsolute, ReorderableListFlags)
Draw list field control for serializable property array.
Declaration
public static void ListFieldAbsolute(Rect position, SerializedProperty arrayProperty, ReorderableListControl.DrawEmptyAbsolute drawEmpty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| SerializedProperty | arrayProperty | Serializable property. |
| ReorderableListControl.DrawEmptyAbsolute | drawEmpty | Callback to draw custom content for empty list (optional). |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListFieldAbsolute(Rect, SerializedProperty, ReorderableListFlags)
Draw list field control for serializable property array.
Declaration
public static void ListFieldAbsolute(Rect position, SerializedProperty arrayProperty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| SerializedProperty | arrayProperty | Serializable property. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
ListFieldAbsolute<T>(Rect, IList<T>, ItemDrawer<T>)
Draw list field control with absolute positioning.
Declaration
public static void ListFieldAbsolute<T>(Rect position, IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListFieldAbsolute<T>(Rect, IList<T>, ItemDrawer<T>, float)
Draw list field control with absolute positioning.
Declaration
public static void ListFieldAbsolute<T>(Rect position, IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, float itemHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| float | itemHeight | Height of a single list item. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListFieldAbsolute<T>(Rect, IList<T>, ItemDrawer<T>, float, ReorderableListFlags)
Draw list field control with absolute positioning.
Declaration
public static void ListFieldAbsolute<T>(Rect position, IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, float itemHeight, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| float | itemHeight | Height of a single list item. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListFieldAbsolute<T>(Rect, IList<T>, ItemDrawer<T>, DrawEmptyAbsolute)
Draw list field control with absolute positioning.
Declaration
public static void ListFieldAbsolute<T>(Rect position, IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, ReorderableListControl.DrawEmptyAbsolute drawEmpty)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| ReorderableListControl.DrawEmptyAbsolute | drawEmpty | Callback to draw custom content for empty list (optional). |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListFieldAbsolute<T>(Rect, IList<T>, ItemDrawer<T>, DrawEmptyAbsolute, float)
Draw list field control with absolute positioning.
Declaration
public static void ListFieldAbsolute<T>(Rect position, IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, ReorderableListControl.DrawEmptyAbsolute drawEmpty, float itemHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| ReorderableListControl.DrawEmptyAbsolute | drawEmpty | Callback to draw custom content for empty list (optional). |
| float | itemHeight | Height of a single list item. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListFieldAbsolute<T>(Rect, IList<T>, ItemDrawer<T>, DrawEmptyAbsolute, float, ReorderableListFlags)
Draw list field control with absolute positioning.
Declaration
public static void ListFieldAbsolute<T>(Rect position, IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, ReorderableListControl.DrawEmptyAbsolute drawEmpty, float itemHeight, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| ReorderableListControl.DrawEmptyAbsolute | drawEmpty | Callback to draw custom content for empty list (optional). |
| float | itemHeight | Height of a single list item. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListFieldAbsolute<T>(Rect, IList<T>, ItemDrawer<T>, DrawEmptyAbsolute, ReorderableListFlags)
Draw list field control with absolute positioning.
Declaration
public static void ListFieldAbsolute<T>(Rect position, IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, ReorderableListControl.DrawEmptyAbsolute drawEmpty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| ReorderableListControl.DrawEmptyAbsolute | drawEmpty | Callback to draw custom content for empty list (optional). |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListFieldAbsolute<T>(Rect, IList<T>, ItemDrawer<T>, ReorderableListFlags)
Draw list field control with absolute positioning.
Declaration
public static void ListFieldAbsolute<T>(Rect position, IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListField<T>(IList<T>, ItemDrawer<T>)
Draw list field control.
Declaration
public static void ListField<T>(IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListField<T>(IList<T>, ItemDrawer<T>, float)
Draw list field control.
Declaration
public static void ListField<T>(IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, float itemHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| float | itemHeight | Height of a single list item. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListField<T>(IList<T>, ItemDrawer<T>, float, ReorderableListFlags)
Draw list field control.
Declaration
public static void ListField<T>(IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, float itemHeight, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| float | itemHeight | Height of a single list item. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListField<T>(IList<T>, ItemDrawer<T>, DrawEmpty)
Draw list field control.
Declaration
public static void ListField<T>(IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, ReorderableListControl.DrawEmpty drawEmpty)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| ReorderableListControl.DrawEmpty | drawEmpty | Callback to draw custom content for empty list (optional). |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListField<T>(IList<T>, ItemDrawer<T>, DrawEmpty, float)
Draw list field control.
Declaration
public static void ListField<T>(IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, ReorderableListControl.DrawEmpty drawEmpty, float itemHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| ReorderableListControl.DrawEmpty | drawEmpty | Callback to draw custom content for empty list (optional). |
| float | itemHeight | Height of a single list item. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListField<T>(IList<T>, ItemDrawer<T>, DrawEmpty, float, ReorderableListFlags)
Draw list field control.
Declaration
public static void ListField<T>(IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, ReorderableListControl.DrawEmpty drawEmpty, float itemHeight, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| ReorderableListControl.DrawEmpty | drawEmpty | Callback to draw custom content for empty list (optional). |
| float | itemHeight | Height of a single list item. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListField<T>(IList<T>, ItemDrawer<T>, DrawEmpty, ReorderableListFlags)
Draw list field control.
Declaration
public static void ListField<T>(IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, ReorderableListControl.DrawEmpty drawEmpty, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| ReorderableListControl.DrawEmpty | drawEmpty | Callback to draw custom content for empty list (optional). |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
ListField<T>(IList<T>, ItemDrawer<T>, ReorderableListFlags)
Draw list field control.
Declaration
public static void ListField<T>(IList<T> list, ReorderableListControl.ItemDrawer<T> drawItem, ReorderableListFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<T> | list | The list which can be reordered. |
| ReorderableListControl.ItemDrawer<T> | drawItem | Callback to draw list item. |
| ReorderableListFlags | flags | Optional flags to pass into list field. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of list item. |
TextFieldItemDrawer(Rect, string)
Draws text field allowing list items to be edited.
Declaration
public static string TextFieldItemDrawer(Rect position, string item)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position to draw list item control(s). |
| string | item | Value of list item. |
Returns
| Type | Description |
|---|---|
| string | Modified value of list item. |
Remarks
Null values are automatically changed to empty strings since null values cannot be edited using a text field.
Value of GUI.changed is set to true if value of item
is modified.
Title(string)
Draw title control for list field.
Declaration
public static void Title(string title)
Parameters
| Type | Name | Description |
|---|---|---|
| string | title | Text for title control. |
Remarks
When needed, should be shown immediately before list field.
Examples
ReorderableListGUI.Title("Your Title");
ReorderableListGUI.ListField(list, DynamicListGU.TextFieldItemDrawer);
ReorderableListGUI.Title('Your Title');
ReorderableListGUI.ListField(list, DynamicListGU.TextFieldItemDrawer);
Title(GUIContent)
Draw title control for list field.
Declaration
public static void Title(GUIContent title)
Parameters
| Type | Name | Description |
|---|---|---|
| GUIContent | title | Content for title control. |
Remarks
When needed, should be shown immediately before list field.
Examples
ReorderableListGUI.Title(titleContent);
ReorderableListGUI.ListField(list, DynamicListGU.TextFieldItemDrawer);
ReorderableListGUI.Title(titleContent);
ReorderableListGUI.ListField(list, DynamicListGU.TextFieldItemDrawer);
Title(Rect, string)
Draw title control for list field with absolute positioning.
Declaration
public static void Title(Rect position, string text)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| string | text | Text for title control. |
Title(Rect, GUIContent)
Draw title control for list field with absolute positioning.
Declaration
public static void Title(Rect position, GUIContent title)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of control. |
| GUIContent | title | Content for title control. |