An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
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.

37 lines
752 B

using UnityEditor;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Fungus;
[CustomEditor (typeof(FungusCommand), true)]
public class FungusCommandEditor : Editor
{
public override void OnInspectorGUI()
{
Rect rect = EditorGUILayout.BeginVertical();
DrawDefaultInspector();
FungusCommand t = target as FungusCommand;
if (t != null)
{
if (t.errorMessage.Length > 0)
{
GUIStyle style = new GUIStyle(GUI.skin.label);
style.normal.textColor = new Color(1,0,0);
EditorGUILayout.LabelField(new GUIContent("Error: " + t.errorMessage), style);
}
if (t.IsExecuting())
{
EditorGUI.DrawRect(rect, new Color(1f, 1f, 0f, 0.25f));
}
}
EditorGUILayout.EndVertical();
}
}