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); }
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)); }
public override EditorGUIElementPlan PlanElementInternal(EditorGUIElementPlan plan, EditorGUILayoutState state) { if (HasLabel()) { plan.SplitAtLeftOffset(state.GetCurrentLabelWidth(), out label_plan, out plan); } return(plan); }
public override EditorGUIElementPlan PlanContentsInternal(EditorGUIElementPlan plan, EditorGUILayoutState state) { return(plan.Shrink(left, right, bottom, top)); }
public void SplitAtTopOffset(float offset, out EditorGUIElementPlan bottom, out EditorGUIElementPlan top) { SplitAtVerticalPosition(top_offset - offset, out bottom, out top); }
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); }
public void SplitAtBottomOffset(float offset, out EditorGUIElementPlan bottom, out EditorGUIElementPlan top) { SplitAtVerticalPosition(bottom_offset + offset, out bottom, out top); }
public void SplitAtRightOffset(float offset, out EditorGUIElementPlan left, out EditorGUIElementPlan right) { SplitAtHorizontalPosition(right_offset - offset, out left, out right); }
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); }
public override EditorGUIElementPlan PlanContentsInternal(EditorGUIElementPlan plan, EditorGUILayoutState state) { plan.SplitAtLeftOffset(state.GetCurrentLabelWidth(), out index_plan, out plan); return(plan); }
public override EditorGUIElementPlan PlanElementInternal(EditorGUIElementPlan plan, EditorGUILayoutState state) { box_plan = plan; return(plan); }
public virtual EditorGUIElementPlan PlanContentsInternal(EditorGUIElementPlan plan, EditorGUILayoutState state) { return(plan); }