예제 #1
0
        public void DoSpecialPreElements(Listing_TreeDefs listing)
        {
            if (obj == null)
            {
                return;
            }
            if (editWidgetsMethod != null)
            {
                WidgetRow widgetRow = listing.StartWidgetsRow(nestDepth);
                editWidgetsMethod.Invoke(obj, new object[1]
                {
                    widgetRow
                });
            }
            Editable editable = obj as Editable;

            if (editable == null)
            {
                return;
            }
            GUI.color = new Color(1f, 0.5f, 0.5f, 1f);
            foreach (string item in editable.ConfigErrors())
            {
                listing.InfoText(item, nestDepth);
            }
            GUI.color = Color.white;
        }
 public void DoSpecialPreElements(Listing_TreeDefs listing)
 {
     if (this.obj != null)
     {
         if (this.editWidgetsMethod != null)
         {
             WidgetRow widgetRow = listing.StartWidgetsRow(this.nestDepth);
             this.editWidgetsMethod.Invoke(this.obj, new object[]
             {
                 widgetRow
             });
         }
         Editable editable = this.obj as Editable;
         if (editable != null)
         {
             GUI.color = new Color(1f, 0.5f, 0.5f, 1f);
             foreach (string text in editable.ConfigErrors())
             {
                 listing.InfoText(text, this.nestDepth);
             }
             GUI.color = Color.white;
         }
     }
 }