1
0
mirror of synced 2025-02-20 12:41:10 +01:00

Add option to generate mip maps in editor

This commit is contained in:
KillzXGaming 2019-04-29 14:53:28 -04:00
parent da67e15bbe
commit c50b57d5dc
7 changed files with 23 additions and 2 deletions

Binary file not shown.

View File

@ -67,6 +67,7 @@
this.adjustmentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.hueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.brightnessContrastToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.generateMipmapsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.SuspendLayout();
@ -372,7 +373,7 @@
this.propertyGridToolStripMenuItem.CheckOnClick = true;
this.propertyGridToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
this.propertyGridToolStripMenuItem.Name = "propertyGridToolStripMenuItem";
this.propertyGridToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
this.propertyGridToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.propertyGridToolStripMenuItem.Text = "Property Grid";
this.propertyGridToolStripMenuItem.CheckedChanged += new System.EventHandler(this.propertyGridToolStripMenuItem_CheckedChanged);
this.propertyGridToolStripMenuItem.Click += new System.EventHandler(this.propertyGridToolStripMenuItem_Click);
@ -380,7 +381,7 @@
// displayVerticalToolStripMenuItem
//
this.displayVerticalToolStripMenuItem.Name = "displayVerticalToolStripMenuItem";
this.displayVerticalToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
this.displayVerticalToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.displayVerticalToolStripMenuItem.Text = "Display Vertical";
this.displayVerticalToolStripMenuItem.CheckedChanged += new System.EventHandler(this.displayVerticalToolStripMenuItem_CheckedChanged);
this.displayVerticalToolStripMenuItem.Click += new System.EventHandler(this.displayVerticalToolStripMenuItem_Click);
@ -389,6 +390,7 @@
//
this.imageToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.editInExternalProgramToolStripMenuItem,
this.generateMipmapsToolStripMenuItem,
this.resizeToolStripMenuItem,
this.reEncodeToolStripMenuItem,
this.flipHorizontalToolStripMenuItem,
@ -480,6 +482,13 @@
this.brightnessContrastToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
this.brightnessContrastToolStripMenuItem.Text = "Brightness / Contrast";
//
// generateMipmapsToolStripMenuItem
//
this.generateMipmapsToolStripMenuItem.Name = "generateMipmapsToolStripMenuItem";
this.generateMipmapsToolStripMenuItem.Size = new System.Drawing.Size(230, 22);
this.generateMipmapsToolStripMenuItem.Text = "Generate Mipmaps";
this.generateMipmapsToolStripMenuItem.Click += new System.EventHandler(this.generateMipmapsToolStripMenuItem_Click);
//
// ImageEditorBase
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -541,5 +550,6 @@
private System.Windows.Forms.ToolStripMenuItem displayVerticalToolStripMenuItem;
private STButton editBtn;
private System.Windows.Forms.ToolStripMenuItem editInExternalProgramToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem generateMipmapsToolStripMenuItem;
}
}

View File

@ -895,5 +895,16 @@ namespace Switch_Toolbox.Library.Forms
ApplyEdit();
}
}
private void generateMipmapsToolStripMenuItem_Click(object sender, EventArgs e)
{
Image Image = pictureBoxCustom1.Image;
if (Image != null)
{
//Applying edits will generate mip maps
UpdateEdit(Image);
ApplyEdit();
}
}
}
}