public void Draw(SerializedProperty property, Slices slices) { var attribute = property.GetCustomAttribute <HighlightAttribute>(); if (attribute == null) { return; } var slice = new DrawableImpl(rect => GuiUtil.DrawRect(rect.Extend(1), attribute.Color)); slices.AddBefore(slice); }
protected MetaSlice DrawHighlight(SerializedProperty property, Slices slices, int before, int after) { var attribute = property.GetCustomAttribute <HighlightAttribute>(); if (attribute == null) { return(null); } var slice = new MetaSlice(before, after, rect => GuiUtil.DrawRect(rect.Extend(1), attribute.Color)); slices.Add(slice); return(slice); }
public void Draw(Rect rect) { rect.x += (rect.width - lineWidth) / 2; rect.width = lineWidth; GuiUtil.DrawRect(rect, GuiUtil.GrayColor); }
private void DrawLine(Rect rect, int thickness) { rect.y += (rect.height - thickness) / 2; rect.height = thickness; GuiUtil.DrawRect(rect, Color); }