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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public void Draw(Rect rect)
 {
     rect.x    += (rect.width - lineWidth) / 2;
     rect.width = lineWidth;
     GuiUtil.DrawRect(rect, GuiUtil.GrayColor);
 }
Esempio n. 4
0
 private void DrawLine(Rect rect, int thickness)
 {
     rect.y     += (rect.height - thickness) / 2;
     rect.height = thickness;
     GuiUtil.DrawRect(rect, Color);
 }