예제 #1
0
        public static void Draw(Rect rect, string title, ColorLegendEntry[] entries)
        {
            GUI.Box(rect, GUIContent.none);
            var contentRect = new Rect(rect.x + padding.x, rect.y + padding.y, rect.width - 2 * padding.x, rect.height - 2 * padding.y);

            ColorLegend.Draw(contentRect, title, entries);
        }
예제 #2
0
 public static Vector2 GetSize(string title, ColorLegendEntry[] entries)
 {
     return(ColorLegend.GetSize(title, entries) + 2 * padding);                  // padding is applied on both sides of the content
 }