diff --git a/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs b/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs index 9da25f4f..4c1b69dc 100644 --- a/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs +++ b/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs @@ -154,23 +154,10 @@ namespace Fungus.Script indentRect.width = indentWidth + 1; indentRect.y -= 2; indentRect.height += 5; - GUI.backgroundColor = new Color(0.8f, 0.8f, 0.8f, 0.1f); + GUI.backgroundColor = new Color(0.8f, 0.8f, 0.8f, 0.25f); GUI.Box(indentRect, ""); } - if (!command.enabled) - { - GUI.backgroundColor = Color.grey; - } - else if (error) - { - GUI.backgroundColor = Color.red; - } - else - { - GUI.backgroundColor = commandInfoAttr.ButtonColor; - } - string commandName = commandInfoAttr.CommandName; GUIStyle commandStyle = new GUIStyle(GUI.skin.box); float buttonWidth = Mathf.Max(commandStyle.CalcSize(new GUIContent(commandName)).x, 80f); @@ -181,8 +168,6 @@ namespace Fungus.Script buttonRect.y -= 2; buttonRect.height += 5; - GUI.Box(buttonRect, commandName, commandStyle); - Rect summaryRect = position; summaryRect.x = buttonRect.x + buttonWidth + 5; summaryRect.width = position.width - buttonWidth - 5; @@ -195,9 +180,37 @@ namespace Fungus.Script fungusScript.selectedCommand = command; GUIUtility.keyboardControl = 0; // Fix for textarea not refeshing (change focus) } + + if ((Application.isPlaying && command.IsExecuting()) || + (!Application.isPlaying && fungusScript.selectedCommand == command)) + { + Rect boxRect = summaryRect; + boxRect.x -= 6; + boxRect.width += 6 - indentWidth * command.indentLevel; + boxRect.y -= 2; + boxRect.height += 5; + GUI.backgroundColor = Color.green; + GUI.Box(boxRect, ""); + } + + if (!command.enabled) + { + GUI.backgroundColor = Color.grey; + } + else if (error) + { + GUI.backgroundColor = Color.red; + } + else + { + GUI.backgroundColor = commandInfoAttr.ButtonColor; + } + + GUI.Box(buttonRect, commandName, commandStyle); + GUI.backgroundColor = Color.white; - + GUIStyle labelStyle = new GUIStyle(EditorStyles.miniLabel); labelStyle.wordWrap = true; if (!command.enabled) @@ -210,17 +223,6 @@ namespace Fungus.Script } GUI.Label(summaryRect, summary, labelStyle); - - if (Event.current.type == EventType.Repaint) - { - if ((Application.isPlaying && command.IsExecuting()) || - (!Application.isPlaying && fungusScript.selectedCommand == command)) - { - Rect boxRect = position; - boxRect.y += 1; - GLDraw.DrawBox(boxRect, Color.green, 1.5f); - } - } } public virtual float GetItemHeight(int index) { diff --git a/Assets/Shuttle/ShuttleGame.unity b/Assets/Shuttle/ShuttleGame.unity index 2ce356e1..bfddae3a 100644 Binary files a/Assets/Shuttle/ShuttleGame.unity and b/Assets/Shuttle/ShuttleGame.unity differ