Browse Source

Executing command & links highlighted in green

master
chrisgregan 11 years ago
parent
commit
1c95171dee
  1. 7
      Assets/Fungus/Editor/FungusCommandEditor.cs
  2. 18
      Assets/Fungus/Editor/FungusEditorWindow.cs

7
Assets/Fungus/Editor/FungusCommandEditor.cs

@ -26,8 +26,11 @@ public class FungusCommandEditor : Editor
EditorGUILayout.LabelField(new GUIContent("Error: " + t.errorMessage), style); EditorGUILayout.LabelField(new GUIContent("Error: " + t.errorMessage), style);
} }
if (t.IsExecuting() || if (t.IsExecuting())
t == selectedCommand) {
EditorGUI.DrawRect(rect, new Color(0f, 1f, 0f, 0.25f));
}
else if (t == selectedCommand)
{ {
EditorGUI.DrawRect(rect, new Color(1f, 1f, 0f, 0.25f)); EditorGUI.DrawRect(rect, new Color(1f, 1f, 0f, 0.25f));
} }

18
Assets/Fungus/Editor/FungusEditorWindow.cs

@ -193,7 +193,14 @@ public class FungusEditorWindow : EditorWindow
} }
else if (ShouldHighlight(command)) else if (ShouldHighlight(command))
{ {
GUI.backgroundColor = Color.yellow; if (command.IsExecuting())
{
GUI.backgroundColor = Color.green;
}
else
{
GUI.backgroundColor = Color.yellow;
}
} }
else else
{ {
@ -257,7 +264,14 @@ public class FungusEditorWindow : EditorWindow
Color color = Color.grey; Color color = Color.grey;
if (highlight) if (highlight)
{ {
color = Color.yellow; if (command.IsExecuting())
{
color = Color.green;
}
else
{
color = Color.yellow;
}
} }
GLDraw.DrawConnectingCurve(pointA, pointB, color, 2); GLDraw.DrawConnectingCurve(pointA, pointB, color, 2);

Loading…
Cancel
Save