コード例 #1
0
    //-------------------------------------------------------------------------------------------------------------
    protected override void DrawEdit(ref Rect pos)
    {
        base.DrawEdit(ref pos);


        if (SelectedType != null)
        {
            if (_template == null)
            {
                InitializeTemplate();
            }

            if (_reorderableList == null)
            {
                InitializeReorderableList();
            }

            //drawLimiter
            CountLimiter.DrawEdit(ref pos);


            //draw template
            _template.SetTemplateType(SelectedType);
            _template.TemplateInstance.IsInEditMode       = true;
            _template.TemplateInstance.ShowEditFieldName  = false;
            _template.TemplateInstance.ShowFieldTypeLabel = false;
            pos.height = _template.TemplateInstance.GetPropertyHeight();
            DrawQuad(pos, 100, 0, 255, .2f);
            _template.TemplateInstance.DrawView(ref pos);
        }
    }
コード例 #2
0
    protected override void DrawObjectField(ref Rect pos)
    {
        if (_reorderableList == null)
        {
            InitializeReorderableList();
        }

        if (_countLimiter != null)
        {
            CountLimiter.ApplyLimits();
        }

        pos.y += 3;
        _reorderableList.DoList(pos);
    }
コード例 #3
0
    public override float GetPropertyHeight()
    {
        float addedHeight = 0;

        if (IsInEditMode && _countLimiter != null)
        {
            addedHeight += CountLimiter.GetEditProperyHeight();
        }
        if (!IsInEditMode && SelectedType != null && _reorderableList != null)
        {
            addedHeight += _reorderableList.Property_Height_ListHeight + 5;
        }
        if (IsInEditMode && SelectedType != null && _template != null)
        {
            addedHeight += _template.TemplateInstance.GetPropertyHeight();
        }

        return(base.GetPropertyHeight() + addedHeight);
    }