Browse Source

Render error text in white for better contrast

master
chrisgregan 11 years ago
parent
commit
afd56a0fb3
  1. 10
      Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs
  2. BIN
      Assets/Shuttle/ShuttleGame.unity

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

@ -146,6 +146,9 @@ namespace Fungus.Script
error = true;
}
bool selected = (Application.isPlaying && command.IsExecuting()) ||
(!Application.isPlaying && fungusScript.selectedCommand == command);
float indentSize = 20;
for (int i = 0; i < command.indentLevel; ++i)
{
@ -185,8 +188,7 @@ namespace Fungus.Script
Color buttonBackgroundColor = commandInfoAttr.ButtonColor;
Color summaryBackgroundColor = Color.white;
if ((Application.isPlaying && command.IsExecuting()) ||
(!Application.isPlaying && fungusScript.selectedCommand == command))
if (selected)
{
summaryBackgroundColor = Color.green;
buttonBackgroundColor = Color.green;
@ -210,6 +212,10 @@ namespace Fungus.Script
{
labelStyle.normal.textColor = Color.grey;
}
else if (error && !selected)
{
labelStyle.normal.textColor = Color.white;
}
GUI.backgroundColor = summaryBackgroundColor;
GUI.Box(summaryRect, summary, labelStyle);

BIN
Assets/Shuttle/ShuttleGame.unity

Binary file not shown.
Loading…
Cancel
Save