From afd56a0fb3010f38f08b9571b51bba9e3512eb62 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 4 Sep 2014 11:23:48 +0100 Subject: [PATCH] Render error text in white for better contrast --- .../Editor/FungusCommandListAdaptor.cs | 10 ++++++++-- Assets/Shuttle/ShuttleGame.unity | Bin 128732 -> 128732 bytes 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs b/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs index b8c6c70b..ccbba41e 100644 --- a/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs +++ b/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); diff --git a/Assets/Shuttle/ShuttleGame.unity b/Assets/Shuttle/ShuttleGame.unity index 3ad5d1801afa743034c5ac986fa4f72d30182c1c..9b10b8c17ca88723244ae404f8bfa8b03ec70418 100644 GIT binary patch delta 289 zcmccfmi^9K_J%Et5y{gXq8WL%rzA6SGVy(ocmBg_evskAR3N>5dvz)!GZ*hPCkBRw z{R|9J&I}9%+q?4_UotWZO}|^ksJ(qbA)^f^qtJFB$B>bCmJ>t68lYmg!wd~N+ofw5 zJ=tLjCp0tGvVx3PDYOC`uTr>cyL2a`qYzMc>}W&4DUjBYH#Gl0q&4l*!E0$r93#0>Tf(-{jG x<+pQeV~k+s`R)_x3lwDd1Eja->}LF^%=h9IiVL#uGk)R&2_pMC`yFE;2LK+!W8DA% delta 289 zcmccfmi^9K_J%Et5y{g9@)-rTXCyPSGVv8eILCajIml3O4oL6WUY*Lw%*A`biGiVE zKLbOEGXq2C_U?SfmyC=e)9+R>YHwdq$Y{gKD6$>MF=XTwaAaUu2UPswFav|$cIg^M zPj;BX3C)bPtRUkrlskZpzfgW)yL2a`qYzMc>}YjAiAyjL7^diQs zeA6AG89Ame*u