From 6f8649f7588ca09988bd2f80474a640c6859c42c Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 4 Sep 2014 11:35:11 +0100 Subject: [PATCH] Green bar behind command inspector title --- .../Editor/FungusCommandEditor.cs | 27 ++++++------------ .../Editor/FungusCommandListAdaptor.cs | 2 +- Assets/Shuttle/ShuttleGame.unity | Bin 128732 -> 128732 bytes 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/Assets/Fungus/FungusScript/Editor/FungusCommandEditor.cs b/Assets/Fungus/FungusScript/Editor/FungusCommandEditor.cs index 511ad891..5e7f03a5 100644 --- a/Assets/Fungus/FungusScript/Editor/FungusCommandEditor.cs +++ b/Assets/Fungus/FungusScript/Editor/FungusCommandEditor.cs @@ -46,18 +46,17 @@ namespace Fungus.Script FungusScript fungusScript = t.GetFungusScript(); - GUILayout.BeginVertical(GUI.skin.box); - - GUILayout.BeginHorizontal(); - CommandInfoAttribute commandInfoAttr = FungusCommandEditor.GetCommandInfo(t.GetType()); if (commandInfoAttr == null) { - GUILayout.EndHorizontal(); - GUILayout.EndVertical(); return; } + GUILayout.BeginVertical(GUI.skin.box); + + GUI.backgroundColor = Color.green; + GUILayout.BeginHorizontal(GUI.skin.box); + string commandName = commandInfoAttr.CommandName; GUIStyle commandStyle = new GUIStyle(GUI.skin.button); if (t.enabled) @@ -69,6 +68,7 @@ namespace Fungus.Script GUI.backgroundColor = Color.grey; } GUILayout.Label(commandName, commandStyle, GUILayout.MinWidth(80), GUILayout.ExpandWidth(true)); + GUI.backgroundColor = Color.white; bool enabled = GUILayout.Toggle(t.enabled, new GUIContent()); @@ -83,22 +83,11 @@ namespace Fungus.Script if (GUILayout.Button("Copy", EditorStyles.miniButton)) { fungusScript.copyCommand = t; - } - - if (fungusScript.copyCommand != null) - { - if (GUILayout.Button("Paste", EditorStyles.miniButton)) - { - Sequence parentSequence = t.GetComponent(); - if (parentSequence != null) - { - PasteCommand(fungusScript.copyCommand, parentSequence); - } - } - } + } } GUILayout.EndHorizontal(); + GUI.backgroundColor = Color.white; EditorGUILayout.Separator(); diff --git a/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs b/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs index ccbba41e..fa78d5b8 100644 --- a/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs +++ b/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs @@ -157,7 +157,7 @@ namespace Fungus.Script indentRect.width = indentSize + 1; indentRect.y -= 2; indentRect.height += 5; - GUI.backgroundColor = new Color(0.8f, 0.8f, 0.8f, 0.25f); + GUI.backgroundColor = new Color(0.5f, 0.5f, 0.5f, 0.5f); GUI.Box(indentRect, ""); } diff --git a/Assets/Shuttle/ShuttleGame.unity b/Assets/Shuttle/ShuttleGame.unity index 9b10b8c17ca88723244ae404f8bfa8b03ec70418..0351b5c923cee05d4d81e04fa21d368b0bca1a3c 100644 GIT binary patch delta 86 zcmccfmi^9K_J%EtIUA=RIlyQ$-C;AM%l0=L8GSfSm>EFez0-kzubse55YceO8A#fL Zn2!~oM}cVnixnau8U(iI>}D*m1^_S}8E60i delta 91 zcmccfmi^9K_J%EtIUA>&WH5?NzqgH%Yx;-tj4azHY-C))X~M(+1Pv