Exemplo n.º 1
0
        internal void DrawElementBase(Rect rect, int index)
        {
            Dictionary <string, Rect> rects = AdvancedRect.GetRects(rect, AdvancedRect.Orientation.Horizontal,
                                                                    new AdvancedRect.FixedItem("ReorderIcon", Styles.DragIconWidth, CanReorder()),
                                                                    new AdvancedRect.ExpandedItem("Element")
                                                                    );

            if (CanReorder())
            {
                Styles.DragIcon.Draw(ExtendedRect.Align(new Vector2(rects["ReorderIcon"].width, 16), rects["ReorderIcon"], RectAlignment.Center));
            }

            DrawElement(rects["Element"], index);
        }
Exemplo n.º 2
0
 public static Rect Expand(this Rect rect, RectPadding padding)
 {
     return(ExtendedRect.Expand(rect, padding));
 }