Browse Source

Explicitly flag command properties as reorderable lists

master
chrisgregan 9 years ago
parent
commit
9a066b366f
  1. 3
      Assets/Fungus/Flowchart/Editor/CommandEditor.cs
  2. 9
      Assets/Fungus/Flowchart/Scripts/Command.cs

3
Assets/Fungus/Flowchart/Editor/CommandEditor.cs

@ -139,7 +139,8 @@ namespace Fungus
continue;
}
if (iterator.isArray)
if (iterator.isArray &&
t.IsReorderableArray(iterator.name))
{
ReorderableListGUI.Title(new GUIContent(iterator.displayName, iterator.tooltip));
ReorderableListGUI.ListField(iterator);

9
Assets/Fungus/Flowchart/Scripts/Command.cs

@ -175,6 +175,15 @@ namespace Fungus
{
return true;
}
/**
* Returns true if the specified property should be displayed as a reorderable list in the inspector.
* This only applies for array properties and has no effect for non-array properties.
*/
public virtual bool IsReorderableArray(string propertyName)
{
return false;
}
}
}
Loading…
Cancel
Save