Browse Source

Added context menu for command list. Fixed Clear behaviour.

master
chrisgregan 11 years ago
parent
commit
aed20c3cb1
  1. 5
      Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs
  2. 2
      Assets/Fungus/FungusScript/Editor/SequenceEditor.cs

5
Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs

@ -79,7 +79,10 @@ namespace Fungus.Script
}
public void Clear() {
_arrayProperty.ClearArray();
while (Count > 0)
{
Remove(0);
}
}
public void DrawItem(Rect position, int index)

2
Assets/Fungus/FungusScript/Editor/SequenceEditor.cs

@ -47,7 +47,7 @@ namespace Fungus.Script
SerializedProperty commandListProperty = serializedObject.FindProperty("commandList");
FungusCommandListAdaptor adaptor = new FungusCommandListAdaptor(commandListProperty, 0);
ReorderableListControl.DrawControlFromState(adaptor, null, ReorderableListFlags.DisableContextMenu | ReorderableListFlags.HideAddButton);
ReorderableListControl.DrawControlFromState(adaptor, null, ReorderableListFlags.DisableDuplicateCommand | ReorderableListFlags.HideAddButton);
if (Application.isPlaying)
{

Loading…
Cancel
Save