Browse Source

Executing command & links highlighted in green

master
chrisgregan 11 years ago
parent
commit
1c95171dee
  1. 7
      Assets/Fungus/Editor/FungusCommandEditor.cs
  2. 14
      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));
}

14
Assets/Fungus/Editor/FungusEditorWindow.cs

@ -192,9 +192,16 @@ public class FungusEditorWindow : EditorWindow
GUI.backgroundColor = Color.red;
}
else if (ShouldHighlight(command))
{
if (command.IsExecuting())
{
GUI.backgroundColor = Color.green;
}
else
{
GUI.backgroundColor = Color.yellow;
}
}
else
{
GUI.backgroundColor = Color.white;
@ -256,9 +263,16 @@ public class FungusEditorWindow : EditorWindow
Color color = Color.grey;
if (highlight)
{
if (command.IsExecuting())
{
color = Color.green;
}
else
{
color = Color.yellow;
}
}
GLDraw.DrawConnectingCurve(pointA, pointB, color, 2);
}

Loading…
Cancel
Save