Exemplo n.º 1
0
 public DictionaryEditorDrawer(Editor host, string dataHeadName, Dictionary <TKey, TValue> data, ValueDrawer drawer)
 {
     this.host         = host;
     this.dataHeadName = dataHeadName;
     this.data         = data;
     this.drawer       = drawer;
     RefreshData();
 }
Exemplo n.º 2
0
 /// <inheritdoc />
 protected override void DoRandomize()
 {
     if (RandomUtils.Bool())
     {
         Value = null;
     }
     else
     {
         Value = Type.DefaultValue();
         if (!IsNull)
         {
             ValueDrawer.Randomize(false);
         }
     }
 }
            protected virtual void DrawValue(ref Rect rect, SerializedProperty property, GUIContent label)
            {
                rect.x     += ValuePadding;
                rect.width -= ValuePadding;

                if (ValueDrawer.HasChildern)
                {
                    ValueDrawer.DrawChildern(ref rect);
                }
                else
                {
                    ValueDrawer.Draw(ref rect);
                }

                rect.x     -= ValuePadding;
                rect.width += ValuePadding;
            }