Browse Source

Added option to disable command colours

master
chrisgregan 10 years ago
parent
commit
97827c37cb
  1. 9
      Assets/Fungus/FungusScript/Editor/FungusCommandEditor.cs
  2. 6
      Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs
  3. 3
      Assets/Fungus/FungusScript/Editor/FungusScriptEditor.cs
  4. 4
      Assets/Fungus/FungusScript/Scripts/FungusScript.cs

9
Assets/Fungus/FungusScript/Editor/FungusCommandEditor.cs

@ -61,7 +61,14 @@ namespace Fungus.Script
GUIStyle commandStyle = new GUIStyle(EditorStyles.miniButton);
if (t.enabled)
{
GUI.backgroundColor = t.GetButtonColor();
if (fungusScript.colorCommands)
{
GUI.backgroundColor = t.GetButtonColor();
}
else
{
GUI.backgroundColor = Color.white;
}
}
else
{

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

@ -185,7 +185,11 @@ namespace Fungus.Script
GUIUtility.keyboardControl = 0; // Fix for textarea not refeshing (change focus)
}
Color buttonBackgroundColor = command.GetButtonColor();
Color buttonBackgroundColor = Color.white;
if (fungusScript.colorCommands)
{
buttonBackgroundColor = command.GetButtonColor();
}
Color summaryBackgroundColor = Color.white;
if (selected)

3
Assets/Fungus/FungusScript/Editor/FungusScriptEditor.cs

@ -53,12 +53,15 @@ namespace Fungus.Script
bool startAutomatically = EditorGUILayout.Toggle(new GUIContent("Start Automatically", "Start this Fungus Script when the scene starts."), t.startAutomatically);
bool colorCommands = EditorGUILayout.Toggle(new GUIContent("Color Commands", "Display commands using colors in editor window."), t.colorCommands);
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(t, "Set Fungus Script");
t.stepTime = stepTime;
t.startSequence = startSequence;
t.startAutomatically = startAutomatically;
t.colorCommands = colorCommands;
}
EditorGUILayout.Separator();

4
Assets/Fungus/FungusScript/Scripts/FungusScript.cs

@ -41,7 +41,9 @@ namespace Fungus.Script
public FungusCommand selectedCommand;
public bool startAutomatically = false;
public bool startAutomatically = true;
public bool colorCommands = true;
public List<FungusVariable> variables = new List<FungusVariable>();

Loading…
Cancel
Save