Browse Source

Draw green rectangle when command is selected

master
chrisgregan 11 years ago
parent
commit
e22101bc11
  1. 15
      Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs
  2. BIN
      Assets/Shuttle/ShuttleGame.unity

15
Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs

@ -116,10 +116,6 @@ namespace Fungus.Script
{ {
GUI.backgroundColor = Color.red; GUI.backgroundColor = Color.red;
} }
else if (fungusScript.selectedCommand == command)
{
GUI.backgroundColor = Color.yellow;
}
else else
{ {
GUI.backgroundColor = commandInfoAttr.ButtonColor; GUI.backgroundColor = commandInfoAttr.ButtonColor;
@ -156,10 +152,15 @@ namespace Fungus.Script
GUI.Label(summaryRect, summary, labelStyle); GUI.Label(summaryRect, summary, labelStyle);
if (Event.current.type == EventType.Repaint && if (Event.current.type == EventType.Repaint)
command.IsExecuting())
{ {
GLDraw.DrawBox(position, Color.green, 1.5f); if ((Application.isPlaying && command.IsExecuting()) ||
(Application.isEditor && fungusScript.selectedCommand == command))
{
Rect boxRect = position;
boxRect.y += 1;
GLDraw.DrawBox(boxRect, Color.green, 1.5f);
}
} }
} }

BIN
Assets/Shuttle/ShuttleGame.unity

Binary file not shown.
Loading…
Cancel
Save