public static void Show(ColorPainter painter, int index)
        {
            EditBrushInColorPaletteWindow window = GetWindow <EditBrushInColorPaletteWindow>();

            window.titleContent = new GUIContent("Edit brush");
            window.minSize      = window.GetWindowSize();
            window.maxSize      = window.GetWindowSize() + Vector2.one;
            window.painter      = painter;
            window.index        = index;
            window.brush        = new ColorPainter.BrushSettings();
            ColorPainter.BrushSettings.Copy(painter.Settings.Palette[index], window.brush);
            window.ShowPopup();
        }
 private static void DisplayEditBrushPopup(TerrainGenerator instance, int i)
 {
     EditBrushInColorPaletteWindow.Show(instance.ColorPainter, i);
 }