public void Draw(int draw_id, Rect view) { EditorGUIUtilityExtensions.UseLabelWidth(layout_state.GetCurrentLabelWidth(), delegate() { attachments.Process(a => a.PreDrawInternal()); bool did_draw = view.Overlaps(element_rect); if (did_draw != did_draw_last) { GUIUtilityExtensions.Unfocus(); } if (did_draw) { DrawElementInternal(draw_id, view); DrawContentsInternal(draw_id, view); attachments.Process(a => a.DrawInternal(view)); } did_draw_last = did_draw; attachments.Process(a => a.PostDrawInternal()); }); last_draw_id = draw_id; }
public override EditorGUIElementPlan PlanElementInternal(EditorGUIElementPlan plan, EditorGUILayoutState state) { if (HasLabel()) { plan.SplitAtLeftOffset(state.GetCurrentLabelWidth(), out label_plan, out plan); } return(plan); }
static public EditorGUILayoutState GetWithShouldAlwaysShowRecoveryFields(this EditorGUILayoutState item, bool should) { return(new EditorGUILayoutState( item.GetCurrentLabelWidth(), item.ShouldAutoSizeLabels(), item.GetAutoSizeLabelMargin(), item.ShouldUseVisibility(), should )); }
public override EditorGUIElementPlan PlanContentsInternal(EditorGUIElementPlan plan, EditorGUILayoutState state) { plan.SplitAtLeftOffset(state.GetCurrentLabelWidth(), out index_plan, out plan); return(plan); }