From dfd79d94a4647b86285c3bdf1ddbb22fa0e69dad Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Fri, 26 Sep 2014 21:40:25 +0100 Subject: [PATCH] Display error icon on right hand side of command --- .../Fungus/FungusScript/Editor/CommandListAdaptor.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Assets/Fungus/FungusScript/Editor/CommandListAdaptor.cs b/Assets/Fungus/FungusScript/Editor/CommandListAdaptor.cs index b6552868..aed01f8e 100644 --- a/Assets/Fungus/FungusScript/Editor/CommandListAdaptor.cs +++ b/Assets/Fungus/FungusScript/Editor/CommandListAdaptor.cs @@ -248,6 +248,18 @@ namespace Fungus summaryRect.x += commandNameWidth; summaryRect.width -= commandNameWidth; } + + if (error) + { + GUISkin editorSkin = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector); + Rect errorRect = new Rect(summaryRect); + errorRect.x += errorRect.width - 20; + errorRect.y += 2; + errorRect.width = 20; + GUI.Label(errorRect, editorSkin.GetStyle("CN EntryError").normal.background); + summaryRect.width -= 20; + } + GUIStyle summaryStyle = new GUIStyle(EditorStyles.miniLabel); summaryStyle.padding.top += 3; summaryStyle.richText = true;