public static void Show(ColorPainter painter) { AddBrushToColorPaletteWindow window = EditorWindow.GetWindow <AddBrushToColorPaletteWindow>(); window.titleContent = new GUIContent("Add brush"); window.minSize = window.GetWindowSize(); window.maxSize = window.GetWindowSize() + Vector2.one; window.painter = painter; window.ShowPopup(); }
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(); }