Reorderable.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using UnityEngine;
  2. namespace HQFPSWeapons {
  3. public class Reorderable : PropertyAttribute {
  4. public bool add;
  5. public bool remove;
  6. public bool draggable;
  7. public bool singleLine;
  8. public string elementNameProperty;
  9. public string elementNameOverride;
  10. public string elementIconPath;
  11. public Reorderable()
  12. : this(null) {
  13. }
  14. public Reorderable(string elementNameProperty)
  15. : this(true, true, true, elementNameProperty, null, null) {
  16. }
  17. public Reorderable(string elementNameProperty, string elementIconPath)
  18. : this(true, true, true, elementNameProperty, null, elementIconPath) {
  19. }
  20. public Reorderable(string elementNameProperty, string elementNameOverride, string elementIconPath)
  21. : this(true, true, true, elementNameProperty, elementNameOverride, elementIconPath) {
  22. }
  23. public Reorderable(bool add, bool remove, bool draggable, string elementNameProperty = null, string elementIconPath = null)
  24. : this(add, remove, draggable, elementNameProperty, null, elementIconPath) {
  25. }
  26. public Reorderable(bool add, bool remove, bool draggable, string elementNameProperty = null, string elementNameOverride = null, string elementIconPath = null) {
  27. this.add = add;
  28. this.remove = remove;
  29. this.draggable = draggable;
  30. this.elementNameProperty = elementNameProperty;
  31. this.elementNameOverride = elementNameOverride;
  32. this.elementIconPath = elementIconPath;
  33. }
  34. }
  35. }