Browse Source

Changed colour for If, Else, EndIf commands.

master
chrisgregan 11 years ago
parent
commit
1e497cd355
  1. 2
      Assets/Fungus/FungusScript/Commands/Call.cs
  2. 2
      Assets/Fungus/FungusScript/Commands/LoadGlobals.cs
  3. 2
      Assets/Fungus/FungusScript/Commands/LoadScene.cs
  4. 2
      Assets/Fungus/FungusScript/Commands/SaveGlobals.cs
  5. 2
      Assets/Fungus/FungusScript/Commands/Set.cs
  6. 2
      Assets/Fungus/FungusScript/Commands/Wait.cs
  7. 18
      Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs

2
Assets/Fungus/FungusScript/Commands/Call.cs

@ -7,7 +7,7 @@ namespace Fungus.Script
[CommandInfo("Scripting", [CommandInfo("Scripting",
"Call", "Call",
"Execute another sequence.", "Execute another sequence.",
253, 253, 150)] 255, 255, 255)]
public class Call : FungusCommand public class Call : FungusCommand
{ {
public Sequence targetSequence; public Sequence targetSequence;

2
Assets/Fungus/FungusScript/Commands/LoadGlobals.cs

@ -7,7 +7,7 @@ namespace Fungus.Script
[CommandInfo("Scripting", [CommandInfo("Scripting",
"Load Globals", "Load Globals",
"Loads a set of global variables previously saved using the SaveGlobals command.", "Loads a set of global variables previously saved using the SaveGlobals command.",
253, 253, 150)] 255, 255, 255)]
public class LoadGlobals : FungusCommand public class LoadGlobals : FungusCommand
{ {
public string saveName = ""; public string saveName = "";

2
Assets/Fungus/FungusScript/Commands/LoadScene.cs

@ -10,7 +10,7 @@ namespace Fungus.Script
"for splitting a large game across multiple scene files to reduce peak memory " + "for splitting a large game across multiple scene files to reduce peak memory " +
"usage. All previously loaded assets (including textures and audio) will be released." + "usage. All previously loaded assets (including textures and audio) will be released." +
"The scene to be loaded must be added to the scene list in Build Settings.", "The scene to be loaded must be added to the scene list in Build Settings.",
253, 253, 150)] 255, 255, 255)]
public class LoadScene : FungusCommand public class LoadScene : FungusCommand
{ {
public string sceneName = ""; public string sceneName = "";

2
Assets/Fungus/FungusScript/Commands/SaveGlobals.cs

@ -7,7 +7,7 @@ namespace Fungus.Script
[CommandInfo("Scripting", [CommandInfo("Scripting",
"Save Globals", "Save Globals",
"Saves all current global variables to be loaded again later using the LoadGlobals command. This provides a basic save game system.", "Saves all current global variables to be loaded again later using the LoadGlobals command. This provides a basic save game system.",
253, 253, 150)] 255, 255, 255)]
public class SaveGlobals : FungusCommand public class SaveGlobals : FungusCommand
{ {
public string saveName = ""; public string saveName = "";

2
Assets/Fungus/FungusScript/Commands/Set.cs

@ -6,7 +6,7 @@ namespace Fungus.Script
[CommandInfo("Scripting", [CommandInfo("Scripting",
"Set", "Set",
"Sets a variable to a new value using simple arithmetic operations. The value can be a constant or another variable.", "Sets a variable to a new value using simple arithmetic operations. The value can be a constant or another variable.",
253, 253, 150)] 255, 255, 255)]
public class Set : FungusCommand public class Set : FungusCommand
{ {
public enum SetOperator public enum SetOperator

2
Assets/Fungus/FungusScript/Commands/Wait.cs

@ -7,7 +7,7 @@ namespace Fungus.Script
[CommandInfo("Scripting", [CommandInfo("Scripting",
"Wait", "Wait",
"Waits for period of time before executing the next command in the sequence.", "Waits for period of time before executing the next command in the sequence.",
253, 253, 150)] 255, 255, 255)]
public class Wait : FungusCommand public class Wait : FungusCommand
{ {
public float duration = 1; public float duration = 1;

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

@ -170,7 +170,7 @@ namespace Fungus.Script
buttonRect.x += indentWidth; buttonRect.x += indentWidth;
buttonRect.width = buttonWidth; buttonRect.width = buttonWidth;
buttonRect.y -= 2; buttonRect.y -= 2;
buttonRect.height += 5; buttonRect.height += 6;
Rect summaryRect = buttonRect; Rect summaryRect = buttonRect;
summaryRect.x += buttonWidth - 1; summaryRect.x += buttonWidth - 1;
@ -193,14 +193,14 @@ namespace Fungus.Script
summaryBackgroundColor = Color.green; summaryBackgroundColor = Color.green;
buttonBackgroundColor = Color.green; buttonBackgroundColor = Color.green;
} }
else if (error) else if (!command.enabled)
{ {
summaryBackgroundColor = Color.red; buttonBackgroundColor = Color.grey;
summaryBackgroundColor = Color.grey;
} }
else if (error)
if (!command.enabled)
{ {
buttonBackgroundColor = Color.grey; summaryBackgroundColor = Color.red;
} }
GUI.backgroundColor = buttonBackgroundColor; GUI.backgroundColor = buttonBackgroundColor;
@ -208,11 +208,7 @@ namespace Fungus.Script
GUIStyle labelStyle = new GUIStyle(EditorStyles.miniButtonRight); GUIStyle labelStyle = new GUIStyle(EditorStyles.miniButtonRight);
labelStyle.alignment = TextAnchor.MiddleLeft; labelStyle.alignment = TextAnchor.MiddleLeft;
if (!command.enabled) if (error && !selected)
{
labelStyle.normal.textColor = Color.grey;
}
else if (error && !selected)
{ {
labelStyle.normal.textColor = Color.white; labelStyle.normal.textColor = Color.white;
} }

Loading…
Cancel
Save