예제 #1
0
        public void LayoutDrawUnwind(Rect rect, EditorGUILayoutState state)
        {
            if (state.ShouldUseVisibility())
            {
                if (Event.current.type == EventType.Repaint)
                {
                    Rect new_visible_rect = GUIUtilityExtensions.GetVisibleRect();

                    if (new_visible_rect.height <= Screen.height && new_visible_rect.height >= 16.0f)
                    {
                        visible_rect = new_visible_rect;
                    }
                }
            }
            else
            {
                visible_rect = rect;
            }

            if (rect.width > 16.0f)
            {
                int draw_id = next_draw_id++;

                element.Plan(rect.width, state);
                element.Layout(rect.min);

                element.Draw(draw_id, visible_rect);
                element.Unwind(draw_id);
            }
        }
예제 #2
0
        protected override float DoPlanInternal()
        {
            if (element != null)
            {
                return(element.Plan(GetContentsWidth(), GetLayoutState()));
            }

            return(0.0f);
        }
예제 #3
0
 public float Plan(float width, EditorGUILayoutState state)
 {
     return(element.Plan(width, state));
 }