| | 1 | | using UnityEngine; |
| | 2 | | using System; |
| | 3 | |
|
| | 4 | | namespace ReorderableList |
| | 5 | | { |
| | 6 | |
|
| | 7 | | public class ReorderableAttribute : PropertyAttribute |
| | 8 | | { |
| | 9 | |
|
| | 10 | | public bool add; |
| | 11 | | public bool remove; |
| | 12 | | public bool draggable; |
| | 13 | | public bool singleLine; |
| | 14 | | public bool paginate; |
| | 15 | | public bool sortable; |
| | 16 | | public int pageSize; |
| | 17 | | public string elementNameProperty; |
| | 18 | | public string elementNameOverride; |
| | 19 | | public string elementIconPath; |
| | 20 | | public Type surrogateType; |
| | 21 | | public string surrogateProperty; |
| | 22 | |
|
| | 23 | | public ReorderableAttribute() |
| 0 | 24 | | : this(null) { } |
| | 25 | |
|
| | 26 | | public ReorderableAttribute(string elementNameProperty) |
| 0 | 27 | | : this(true, true, true, elementNameProperty, null, null) { } |
| | 28 | |
|
| | 29 | | public ReorderableAttribute(string elementNameProperty, string elementIconPath) |
| 0 | 30 | | : this(true, true, true, elementNameProperty, null, elementIconPath) { } |
| | 31 | |
|
| | 32 | | public ReorderableAttribute(string elementNameProperty, string elementNameOverride, string elementIconPath) |
| 0 | 33 | | : this(true, true, true, elementNameProperty, elementNameOverride, elementIconPath) { } |
| | 34 | |
|
| | 35 | | public ReorderableAttribute(bool add, bool remove, bool draggable, string elementNameProperty = null, string ele |
| 0 | 36 | | : this(add, remove, draggable, elementNameProperty, null, elementIconPath) { } |
| | 37 | |
|
| 0 | 38 | | public ReorderableAttribute(bool add, bool remove, bool draggable, string elementNameProperty = null, string ele |
| | 39 | | { |
| | 40 | |
|
| 0 | 41 | | this.add = add; |
| 0 | 42 | | this.remove = remove; |
| 0 | 43 | | this.draggable = draggable; |
| 0 | 44 | | this.elementNameProperty = elementNameProperty; |
| 0 | 45 | | this.elementNameOverride = elementNameOverride; |
| 0 | 46 | | this.elementIconPath = elementIconPath; |
| | 47 | |
|
| 0 | 48 | | sortable = true; |
| 0 | 49 | | } |
| | 50 | | } |
| | 51 | | } |