//Shows the actual node contents GUI
        static void ShowNodeContents(Node node) {

            GUI.color = Color.white;
            GUI.skin.label.richText = true;
            GUI.skin.label.alignment = TextAnchor.MiddleCenter;

            node.OnNodeGUI();

            if ( node is ITaskAssignable ) {
                GUILayout.BeginVertical(Styles.roundedBox);
                var task = ( node as ITaskAssignable ).task;
                GUILayout.Label(task != null ? task.summaryInfo : "No Task");
                GUILayout.EndVertical();
            }

            GUI.skin.label.alignment = TextAnchor.UpperLeft;
        }
Пример #2
0
        //Shows the actual node contents GUI
        static void ShowNodeContents(Node node)
        {
            GUI.color = Color.white;
            GUI.skin.label.richText  = true;
            GUI.skin.label.alignment = TextAnchor.MiddleCenter;

            node.OnNodeGUI();

            if (node is ITaskAssignable)
            {
                var task = (node as ITaskAssignable).task;
                if (task == null)
                {
                    GUILayout.Label("No Task");
                }
                else
                {
                    GUILayout.Label(NCPrefs.showTaskSummary? task.summaryInfo : string.Format("<b>{0}</b>", task.name));
                }
            }

            GUI.skin.label.alignment = TextAnchor.UpperLeft;
        }