示例#1
0
        private bool DoPlan()
        {
            float old_footprint_height = footprint_height;

            is_plan_invalid   = false;
            is_layout_invalid = true;

            element_plan = attachments.Apply(
                new EditorGUIElementPlan(footprint_width),
                (p, a) => a.PlanElementInternal(p, layout_state)
                );

            contents_plan = attachments.Apply(
                element_plan,
                (p, a) => a.PlanContentsInternal(p, layout_state)
                );

            footprint_height = attachments.Apply(
                DoPlanInternal(),
                (h, a) => a.ModifyFootprintHeight(h, layout_state)
                );

            if (footprint_height != old_footprint_height)
            {
                return(true);
            }

            return(false);
        }
示例#2
0
        public override EditorGUIElementPlan PlanContentsInternal(EditorGUIElementPlan plan, EditorGUILayoutState state)
        {
            if (HasLabel())
            {
                plan.SplitAtBottomOffset(label_height, out label_plan, out plan);
            }

            return(plan.Shrink(indent_width, 0.0f, 0.0f, 0.0f));
        }
示例#3
0
        public override EditorGUIElementPlan PlanElementInternal(EditorGUIElementPlan plan, EditorGUILayoutState state)
        {
            if (HasLabel())
            {
                plan.SplitAtLeftOffset(state.GetCurrentLabelWidth(), out label_plan, out plan);
            }

            return(plan);
        }
示例#4
0
 public override EditorGUIElementPlan PlanContentsInternal(EditorGUIElementPlan plan, EditorGUILayoutState state)
 {
     return(plan.Shrink(left, right, bottom, top));
 }
示例#5
0
 public void SplitAtTopOffset(float offset, out EditorGUIElementPlan bottom, out EditorGUIElementPlan top)
 {
     SplitAtVerticalPosition(top_offset - offset, out bottom, out top);
 }
示例#6
0
 public void SplitAtVerticalPosition(float position, out EditorGUIElementPlan bottom, out EditorGUIElementPlan top)
 {
     bottom = new EditorGUIElementPlan(left_offset, right_offset, bottom_offset, position);
     top    = new EditorGUIElementPlan(left_offset, right_offset, position, top_offset);
 }
示例#7
0
 public void SplitAtBottomOffset(float offset, out EditorGUIElementPlan bottom, out EditorGUIElementPlan top)
 {
     SplitAtVerticalPosition(bottom_offset + offset, out bottom, out top);
 }
示例#8
0
 public void SplitAtRightOffset(float offset, out EditorGUIElementPlan left, out EditorGUIElementPlan right)
 {
     SplitAtHorizontalPosition(right_offset - offset, out left, out right);
 }
示例#9
0
 public void SplitAtHorizontalPosition(float position, out EditorGUIElementPlan left, out EditorGUIElementPlan right)
 {
     left  = new EditorGUIElementPlan(left_offset, position, bottom_offset, top_offset);
     right = new EditorGUIElementPlan(position, right_offset, bottom_offset, top_offset);
 }
示例#10
0
        public override EditorGUIElementPlan PlanContentsInternal(EditorGUIElementPlan plan, EditorGUILayoutState state)
        {
            plan.SplitAtLeftOffset(state.GetCurrentLabelWidth(), out index_plan, out plan);

            return(plan);
        }
示例#11
0
        public override EditorGUIElementPlan PlanElementInternal(EditorGUIElementPlan plan, EditorGUILayoutState state)
        {
            box_plan = plan;

            return(plan);
        }
示例#12
0
 public virtual EditorGUIElementPlan PlanContentsInternal(EditorGUIElementPlan plan, EditorGUILayoutState state)
 {
     return(plan);
 }