From a151d31df599f5fa1ac85db974a82296ee0852ff Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Sun, 19 Apr 2015 23:36:51 +0100 Subject: [PATCH] Added info box if no commands currently in command list --- Assets/Fungus/Flowchart/Editor/BlockEditor.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Assets/Fungus/Flowchart/Editor/BlockEditor.cs b/Assets/Fungus/Flowchart/Editor/BlockEditor.cs index 3bcfd362..f8aa3937 100644 --- a/Assets/Fungus/Flowchart/Editor/BlockEditor.cs +++ b/Assets/Fungus/Flowchart/Editor/BlockEditor.cs @@ -80,8 +80,15 @@ namespace Fungus adaptor.nodeRect = block.nodeRect; ReorderableListFlags flags = ReorderableListFlags.HideAddButton | ReorderableListFlags.HideRemoveButtons | ReorderableListFlags.DisableContextMenu; - - ReorderableListControl.DrawControlFromState(adaptor, null, flags); + + if (block.commandList.Count == 0) + { + EditorGUILayout.HelpBox("Press the + button below to add a command to the list.", MessageType.Info); + } + else + { + ReorderableListControl.DrawControlFromState(adaptor, null, flags); + } // EventType.contextClick doesn't register since we moved the Sequence Editor to be inside // a GUI Area, no idea why. As a workaround we just check for right click instead.