コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }