You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
620 B
28 lines
620 B
10 years ago
|
using UnityEditor;
|
||
|
using UnityEditorInternal;
|
||
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
|
||
10 years ago
|
namespace Fungus.Script
|
||
10 years ago
|
{
|
||
10 years ago
|
|
||
10 years ago
|
[CustomEditor (typeof(Say))]
|
||
10 years ago
|
public class SayEditor : FungusCommandEditor
|
||
10 years ago
|
{
|
||
10 years ago
|
public override void DrawCommandInspectorGUI()
|
||
|
{
|
||
10 years ago
|
Say t = target as Say;
|
||
10 years ago
|
|
||
|
EditorGUILayout.PrefixLabel(new GUIContent("Say Text", "Text to display in dialog"));
|
||
|
EditorStyles.textField.wordWrap = true;
|
||
10 years ago
|
string text = EditorGUILayout.TextArea(t.text, GUILayout.MinHeight(50));
|
||
10 years ago
|
if (text != t.text)
|
||
|
{
|
||
|
Undo.RecordObject(t, "Set Text");
|
||
|
t.text = text;
|
||
|
}
|
||
|
}
|
||
10 years ago
|
}
|
||
10 years ago
|
|
||
|
}
|