Browse Source

Custom editor for SetDialog

master
chrisgregan 11 years ago
parent
commit
604d52ecac
  1. 31
      Assets/Fungus/Dialog/Editor/SetDialog.cs
  2. 8
      Assets/Fungus/Dialog/Editor/SetDialog.cs.meta

31
Assets/Fungus/Dialog/Editor/SetDialog.cs

@ -0,0 +1,31 @@
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Rotorz.ReorderableList;
namespace Fungus.Script
{
[CustomEditor (typeof(SetDialog))]
public class SetDialogEditor : FungusCommandEditor
{
public override void DrawCommandGUI()
{
SetDialog t = target as SetDialog;
EditorGUI.BeginChangeCheck();
DialogController dialogController = FungusCommandEditor.ObjectField<DialogController>(new GUIContent("Active Dialog", "Dialog to use when displaying Say command story text"),
new GUIContent("<None>"),
t.dialogController);
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(t, "Set Dialog");
t.dialogController = dialogController;
}
}
}
}

8
Assets/Fungus/Dialog/Editor/SetDialog.cs.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f77de3c7e9e264872bfb94713e4c4844
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
Loading…
Cancel
Save