diff --git a/Assets/Fungus/FungusScript/Editor/FungusCommandEditor.cs b/Assets/Fungus/FungusScript/Editor/FungusCommandEditor.cs index dc01cf30..f39b77ea 100644 --- a/Assets/Fungus/FungusScript/Editor/FungusCommandEditor.cs +++ b/Assets/Fungus/FungusScript/Editor/FungusCommandEditor.cs @@ -50,13 +50,6 @@ namespace Fungus.Script GUILayout.BeginHorizontal(); - bool enabled = GUILayout.Toggle(t.enabled, new GUIContent()); - if (t.enabled != enabled) - { - Undo.RecordObject(t, "Set Enabled"); - t.enabled = enabled; - } - CommandInfoAttribute commandInfoAttr = FungusCommandEditor.GetCommandInfo(t.GetType()); if (commandInfoAttr == null) { @@ -66,13 +59,28 @@ namespace Fungus.Script } string commandName = commandInfoAttr.CommandName; - GUILayout.Label(commandName + " Command", EditorStyles.boldLabel); + GUIStyle commandStyle = new GUIStyle(GUI.skin.box); + if (t.enabled) + { + GUI.backgroundColor = commandInfoAttr.ButtonColor; + } + else + { + GUI.backgroundColor = Color.grey; + } + GUILayout.Label(commandName, commandStyle, GUILayout.MinWidth(80), GUILayout.ExpandWidth(true)); + GUI.backgroundColor = Color.white; - GUILayout.FlexibleSpace(); + bool enabled = GUILayout.Toggle(t.enabled, new GUIContent()); + if (t.enabled != enabled) + { + Undo.RecordObject(t, "Set Enabled"); + t.enabled = enabled; + } if (fungusScript != null) { - if (GUILayout.Button("Copy", EditorStyles.miniButtonMid)) + if (GUILayout.Button("Copy", EditorStyles.miniButton)) { fungusScript.copyCommand = t; } diff --git a/Assets/Shuttle/ShuttleGame.unity b/Assets/Shuttle/ShuttleGame.unity index 05fcc0d2..3924df6f 100644 Binary files a/Assets/Shuttle/ShuttleGame.unity and b/Assets/Shuttle/ShuttleGame.unity differ