Browse Source

SavedObjects displays flowcharts as a reorderable list.

master
Christopher 8 years ago
parent
commit
bd12624b58
  1. 29
      Assets/Fungus/Scripts/Editor/SavePointLoadedEditor.cs
  2. 27
      Assets/Fungus/Scripts/Editor/SavedObjectsEditor.cs
  3. 0
      Assets/Fungus/Scripts/Editor/SavedObjectsEditor.cs.meta

29
Assets/Fungus/Scripts/Editor/SavePointLoadedEditor.cs

@ -1,29 +0,0 @@
using UnityEngine;
using UnityEditor;
using Rotorz.ReorderableList;
namespace Fungus.EditorUtils
{
[CustomEditor (typeof(SavePointLoaded), true)]
public class SavePointLoadedEditor : EventHandlerEditor
{
protected SerializedProperty savePointKeysProp;
protected virtual void OnEnable()
{
savePointKeysProp = serializedObject.FindProperty("savePointKeys");
}
public override void DrawInspectorGUI()
{
serializedObject.Update();
ReorderableListGUI.Title("Save Point Keys");
ReorderableListGUI.ListField(savePointKeysProp);
DrawHelpBox();
serializedObject.ApplyModifiedProperties();
}
}
}

27
Assets/Fungus/Scripts/Editor/SavedObjectsEditor.cs

@ -0,0 +1,27 @@
using UnityEngine;
using UnityEditor;
using Rotorz.ReorderableList;
namespace Fungus.EditorUtils
{
[CustomEditor (typeof(SavedObjects), true)]
public class SavedObjectsEditor : Editor
{
protected SerializedProperty flowchartsProp;
protected virtual void OnEnable()
{
flowchartsProp = serializedObject.FindProperty("flowcharts");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
ReorderableListGUI.Title("Flowcharts");
ReorderableListGUI.ListField(flowchartsProp);
serializedObject.ApplyModifiedProperties();
}
}
}

0
Assets/Fungus/Scripts/Editor/SavePointLoadedEditor.cs.meta → Assets/Fungus/Scripts/Editor/SavedObjectsEditor.cs.meta

Loading…
Cancel
Save