protected override T DoEdit(Rect rect, T obj, TContext context, fiGraphMetadata metadata)
            {
                float padding = rect.height - _centered.GetHeight(obj, context, metadata);

                rect.y      += padding / 2;
                rect.height -= padding;

                return(_centered.Edit(rect, obj, context, metadata));
            }
Beispiel #2
0
            protected override float DoGetHeight(T obj, TContext context, fiGraphMetadata metadata)
            {
                var top    = _top.GetCurrentValue(obj, context);
                var bottom = _bottom.GetCurrentValue(obj, context);

                return(_control.GetHeight(obj, context, metadata) + top + bottom);
            }
Beispiel #3
0
            protected override float DoGetHeight(T obj, TContext context, fiGraphMetadata metadata)
            {
                _data.Push(obj);
                var height = _control.GetHeight(obj, context, metadata);

                _data.Pop();
                return(height);
            }
            protected override float DoGetHeight(T obj, TContext context, fiGraphMetadata metadata)
            {
                var foldout = GetMetadata(metadata);

                float height = fiLateBindings.EditorGUIUtility.singleLineHeight;

                if (foldout.IsExpanded)
                {
                    height += fiLateBindings.EditorGUIUtility.standardVerticalSpacing;
                    height += _control.GetHeight(obj, context, metadata);
                }

                return(height);
            }
Beispiel #5
0
            protected override float DoGetHeight(T obj, TContext context, fiGraphMetadata metadata)
            {
                float height = 0;

                if (GUIContent.GetCurrentValue(obj, context).IsEmpty == false)
                {
                    height += fiLateBindings.EditorGUIUtility.singleLineHeight;
                }

                if (_control != null)
                {
                    var controlHeight = _control.GetHeight(obj, context, metadata);
                    if (InlineControl == false)
                    {
                        height += fiLateBindings.EditorGUIUtility.standardVerticalSpacing + controlHeight;
                    }
                }

                return(height);
            }
Beispiel #6
0
 protected override float DoGetHeight(T obj, TContext context, fiGraphMetadata metadata)
 {
     return(_childControl.GetHeight(obj, context, metadata));
 }
Beispiel #7
0
 protected override float DoGetHeight(TTo obj, TContextTo context, fiGraphMetadata metadata)
 {
     return(_control.GetHeight(Cast <TFrom>(obj), Cast <TContextFrom>(context), metadata));
 }