From 1c95171dee1776cfef47904015ad835128a859bd Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 31 Jul 2014 14:12:34 +0100 Subject: [PATCH] Executing command & links highlighted in green --- Assets/Fungus/Editor/FungusCommandEditor.cs | 7 +++++-- Assets/Fungus/Editor/FungusEditorWindow.cs | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Assets/Fungus/Editor/FungusCommandEditor.cs b/Assets/Fungus/Editor/FungusCommandEditor.cs index 01e7e39f..f33b2326 100644 --- a/Assets/Fungus/Editor/FungusCommandEditor.cs +++ b/Assets/Fungus/Editor/FungusCommandEditor.cs @@ -26,8 +26,11 @@ public class FungusCommandEditor : Editor EditorGUILayout.LabelField(new GUIContent("Error: " + t.errorMessage), style); } - if (t.IsExecuting() || - t == selectedCommand) + if (t.IsExecuting()) + { + EditorGUI.DrawRect(rect, new Color(0f, 1f, 0f, 0.25f)); + } + else if (t == selectedCommand) { EditorGUI.DrawRect(rect, new Color(1f, 1f, 0f, 0.25f)); } diff --git a/Assets/Fungus/Editor/FungusEditorWindow.cs b/Assets/Fungus/Editor/FungusEditorWindow.cs index 42639e3f..1bf44431 100755 --- a/Assets/Fungus/Editor/FungusEditorWindow.cs +++ b/Assets/Fungus/Editor/FungusEditorWindow.cs @@ -193,7 +193,14 @@ public class FungusEditorWindow : EditorWindow } else if (ShouldHighlight(command)) { - GUI.backgroundColor = Color.yellow; + if (command.IsExecuting()) + { + GUI.backgroundColor = Color.green; + } + else + { + GUI.backgroundColor = Color.yellow; + } } else { @@ -257,7 +264,14 @@ public class FungusEditorWindow : EditorWindow Color color = Color.grey; if (highlight) { - color = Color.yellow; + if (command.IsExecuting()) + { + color = Color.green; + } + else + { + color = Color.yellow; + } } GLDraw.DrawConnectingCurve(pointA, pointB, color, 2);