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);
}
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));
}

18
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);

Loading…
Cancel
Save