diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo
index 10042eb9..46fcf363 100644
Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ
diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide
index b91243f4..66bc6571 100644
Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ
diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal
index 68c1f92c..8af92402 100644
Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ
diff --git a/Switch_FileFormatsMain/FileFormats/Texture/BNTX.cs b/Switch_FileFormatsMain/FileFormats/Texture/BNTX.cs
index 2f88efe9..a277e2ad 100644
--- a/Switch_FileFormatsMain/FileFormats/Texture/BNTX.cs
+++ b/Switch_FileFormatsMain/FileFormats/Texture/BNTX.cs
@@ -967,6 +967,8 @@ namespace FirstPlugin
public void UpdateEditor()
{
+ OnPropertyChanged();
+
if (Parent != null && Parent.Parent != null && Parent.Parent is BFRES)
{
((BFRES)Parent.Parent).LoadEditors(this);
diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache
index 1e5eb17d..f95cb2c5 100644
Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/Switch_Toolbox_Library/Config.cs b/Switch_Toolbox_Library/Config.cs
index 72db7b1d..68cb0204 100644
--- a/Switch_Toolbox_Library/Config.cs
+++ b/Switch_Toolbox_Library/Config.cs
@@ -184,6 +184,12 @@ namespace Switch_Toolbox.Library
case "ShowPropertiesPanel":
bool.TryParse(node.InnerText, out Runtime.ImageEditor.ShowPropertiesPanel);
break;
+ case "DisplayAlpha":
+ bool.TryParse(node.InnerText, out Runtime.ImageEditor.DisplayAlpha);
+ break;
+ case "UseComponetSelector":
+ bool.TryParse(node.InnerText, out Runtime.ImageEditor.UseComponetSelector);
+ break;
}
}
}
@@ -307,6 +313,8 @@ namespace Switch_Toolbox.Library
parentNode.AppendChild(PathsNode);
PathsNode.AppendChild(createNode(doc, "DisplayVertical", Runtime.ImageEditor.DisplayVertical.ToString()));
PathsNode.AppendChild(createNode(doc, "ShowPropertiesPanel", Runtime.ImageEditor.ShowPropertiesPanel.ToString()));
+ PathsNode.AppendChild(createNode(doc, "DisplayAlpha", Runtime.ImageEditor.DisplayAlpha.ToString()));
+ PathsNode.AppendChild(createNode(doc, "UseComponetSelector", Runtime.ImageEditor.UseComponetSelector.ToString()));
}
private static void AppendPathSettings(XmlDocument doc, XmlNode parentNode)
{
diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs
index 8a279cf7..004d11e8 100644
--- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs
+++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs
@@ -33,15 +33,12 @@
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.stPanel2 = new Switch_Toolbox.Library.Forms.STPanel();
this.stPanel1 = new Switch_Toolbox.Library.Forms.STPanel();
- this.alphaChannelBtn = new Switch_Toolbox.Library.Forms.STButton();
this.stPanel4 = new Switch_Toolbox.Library.Forms.STPanel();
this.pictureBoxCustom1 = new Switch_Toolbox.Library.Forms.PictureBoxCustom();
this.stContextMenuStrip2 = new Switch_Toolbox.Library.Forms.STContextMenuStrip(this.components);
this.copyImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.blueChannelBtn = new Switch_Toolbox.Library.Forms.STButton();
this.stPanel3 = new Switch_Toolbox.Library.Forms.STPanel();
this.editBtn = new Switch_Toolbox.Library.Forms.STButton();
- this.toggleAlphaChk = new Switch_Toolbox.Library.Forms.STCheckBox();
this.saveBtn = new Switch_Toolbox.Library.Forms.STButton();
this.arrayLevelCounterLabel = new Switch_Toolbox.Library.Forms.STLabel();
this.BtmMipsLeft = new Switch_Toolbox.Library.Forms.STButton();
@@ -49,9 +46,7 @@
this.btnRightArray = new Switch_Toolbox.Library.Forms.STButton();
this.BtnMipsRight = new Switch_Toolbox.Library.Forms.STButton();
this.btnLeftArray = new Switch_Toolbox.Library.Forms.STButton();
- this.greenChannelBtn = new Switch_Toolbox.Library.Forms.STButton();
this.imageBGComboBox = new Switch_Toolbox.Library.Forms.STComboBox();
- this.redChannelBtn = new Switch_Toolbox.Library.Forms.STButton();
this.stContextMenuStrip1 = new Switch_Toolbox.Library.Forms.STMenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -75,7 +70,8 @@
this.adjustmentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.hueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.brightnessContrastToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.componentSelector = new Switch_Toolbox.Library.Forms.STCheckBox();
+ this.displayAlphaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.useComponentSelectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.SuspendLayout();
@@ -119,13 +115,9 @@
//
// stPanel1
//
- this.stPanel1.Controls.Add(this.alphaChannelBtn);
this.stPanel1.Controls.Add(this.stPanel4);
- this.stPanel1.Controls.Add(this.blueChannelBtn);
this.stPanel1.Controls.Add(this.stPanel3);
- this.stPanel1.Controls.Add(this.greenChannelBtn);
this.stPanel1.Controls.Add(this.imageBGComboBox);
- this.stPanel1.Controls.Add(this.redChannelBtn);
this.stPanel1.Controls.Add(this.stContextMenuStrip1);
this.stPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.stPanel1.Location = new System.Drawing.Point(0, 0);
@@ -133,18 +125,6 @@
this.stPanel1.Size = new System.Drawing.Size(520, 502);
this.stPanel1.TabIndex = 2;
//
- // alphaChannelBtn
- //
- this.alphaChannelBtn.BackColor = System.Drawing.Color.Silver;
- this.alphaChannelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.alphaChannelBtn.Location = new System.Drawing.Point(464, 1);
- this.alphaChannelBtn.Name = "alphaChannelBtn";
- this.alphaChannelBtn.Size = new System.Drawing.Size(21, 21);
- this.alphaChannelBtn.TabIndex = 17;
- this.alphaChannelBtn.Text = "A";
- this.alphaChannelBtn.UseVisualStyleBackColor = false;
- this.alphaChannelBtn.Click += new System.EventHandler(this.ChannelBtn_Click);
- //
// stPanel4
//
this.stPanel4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -183,23 +163,9 @@
this.copyImageToolStripMenuItem.Text = "Copy Image";
this.copyImageToolStripMenuItem.Click += new System.EventHandler(this.copyImageToolStripMenuItem_Click);
//
- // blueChannelBtn
- //
- this.blueChannelBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
- this.blueChannelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.blueChannelBtn.Location = new System.Drawing.Point(437, 1);
- this.blueChannelBtn.Name = "blueChannelBtn";
- this.blueChannelBtn.Size = new System.Drawing.Size(21, 21);
- this.blueChannelBtn.TabIndex = 16;
- this.blueChannelBtn.Text = "B";
- this.blueChannelBtn.UseVisualStyleBackColor = false;
- this.blueChannelBtn.Click += new System.EventHandler(this.ChannelBtn_Click);
- //
// stPanel3
//
- this.stPanel3.Controls.Add(this.componentSelector);
this.stPanel3.Controls.Add(this.editBtn);
- this.stPanel3.Controls.Add(this.toggleAlphaChk);
this.stPanel3.Controls.Add(this.saveBtn);
this.stPanel3.Controls.Add(this.arrayLevelCounterLabel);
this.stPanel3.Controls.Add(this.BtmMipsLeft);
@@ -227,19 +193,6 @@
this.editBtn.UseVisualStyleBackColor = false;
this.editBtn.Click += new System.EventHandler(this.editBtn_Click);
//
- // toggleAlphaChk
- //
- this.toggleAlphaChk.AutoSize = true;
- this.toggleAlphaChk.Checked = true;
- this.toggleAlphaChk.CheckState = System.Windows.Forms.CheckState.Checked;
- this.toggleAlphaChk.Location = new System.Drawing.Point(85, 7);
- this.toggleAlphaChk.Name = "toggleAlphaChk";
- this.toggleAlphaChk.Size = new System.Drawing.Size(83, 17);
- this.toggleAlphaChk.TabIndex = 15;
- this.toggleAlphaChk.Text = "Show Alpha";
- this.toggleAlphaChk.UseVisualStyleBackColor = true;
- this.toggleAlphaChk.CheckedChanged += new System.EventHandler(this.toggleAlphaChk_CheckedChanged);
- //
// saveBtn
//
this.saveBtn.BackColor = System.Drawing.Color.Transparent;
@@ -318,18 +271,6 @@
this.btnLeftArray.UseVisualStyleBackColor = true;
this.btnLeftArray.Click += new System.EventHandler(this.btnLeftArray_Click);
//
- // greenChannelBtn
- //
- this.greenChannelBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
- this.greenChannelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.greenChannelBtn.Location = new System.Drawing.Point(410, 1);
- this.greenChannelBtn.Name = "greenChannelBtn";
- this.greenChannelBtn.Size = new System.Drawing.Size(21, 21);
- this.greenChannelBtn.TabIndex = 15;
- this.greenChannelBtn.Text = "G";
- this.greenChannelBtn.UseVisualStyleBackColor = false;
- this.greenChannelBtn.Click += new System.EventHandler(this.ChannelBtn_Click);
- //
// imageBGComboBox
//
this.imageBGComboBox.BorderColor = System.Drawing.Color.Empty;
@@ -343,18 +284,6 @@
this.imageBGComboBox.TabIndex = 2;
this.imageBGComboBox.SelectedIndexChanged += new System.EventHandler(this.imageBGComboBox_SelectedIndexChanged);
//
- // redChannelBtn
- //
- this.redChannelBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- this.redChannelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.redChannelBtn.Location = new System.Drawing.Point(383, 1);
- this.redChannelBtn.Name = "redChannelBtn";
- this.redChannelBtn.Size = new System.Drawing.Size(21, 21);
- this.redChannelBtn.TabIndex = 14;
- this.redChannelBtn.Text = "R";
- this.redChannelBtn.UseVisualStyleBackColor = false;
- this.redChannelBtn.Click += new System.EventHandler(this.ChannelBtn_Click);
- //
// stContextMenuStrip1
//
this.stContextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -427,7 +356,9 @@
//
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.propertyGridToolStripMenuItem,
- this.displayVerticalToolStripMenuItem});
+ this.displayVerticalToolStripMenuItem,
+ this.displayAlphaToolStripMenuItem,
+ this.useComponentSelectorToolStripMenuItem});
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.viewToolStripMenuItem.Text = "View";
@@ -438,7 +369,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(205, 22);
this.propertyGridToolStripMenuItem.Text = "Property Grid";
this.propertyGridToolStripMenuItem.CheckedChanged += new System.EventHandler(this.propertyGridToolStripMenuItem_CheckedChanged);
this.propertyGridToolStripMenuItem.Click += new System.EventHandler(this.propertyGridToolStripMenuItem_Click);
@@ -446,7 +377,7 @@
// displayVerticalToolStripMenuItem
//
this.displayVerticalToolStripMenuItem.Name = "displayVerticalToolStripMenuItem";
- this.displayVerticalToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
+ this.displayVerticalToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
this.displayVerticalToolStripMenuItem.Text = "Display Vertical";
this.displayVerticalToolStripMenuItem.CheckedChanged += new System.EventHandler(this.displayVerticalToolStripMenuItem_CheckedChanged);
this.displayVerticalToolStripMenuItem.Click += new System.EventHandler(this.displayVerticalToolStripMenuItem_Click);
@@ -546,18 +477,19 @@
this.brightnessContrastToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
this.brightnessContrastToolStripMenuItem.Text = "Brightness / Contrast";
//
- // componentSelector
+ // displayAlphaToolStripMenuItem
//
- this.componentSelector.AutoSize = true;
- this.componentSelector.Checked = true;
- this.componentSelector.CheckState = System.Windows.Forms.CheckState.Checked;
- this.componentSelector.Location = new System.Drawing.Point(174, 7);
- this.componentSelector.Name = "componentSelector";
- this.componentSelector.Size = new System.Drawing.Size(144, 17);
- this.componentSelector.TabIndex = 17;
- this.componentSelector.Text = "Use Component Selector";
- this.componentSelector.UseVisualStyleBackColor = true;
- this.componentSelector.CheckedChanged += new System.EventHandler(this.componentSelector_CheckedChanged);
+ this.displayAlphaToolStripMenuItem.Name = "displayAlphaToolStripMenuItem";
+ this.displayAlphaToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
+ this.displayAlphaToolStripMenuItem.Text = "Display Alpha";
+ this.displayAlphaToolStripMenuItem.Click += new System.EventHandler(this.displayAlphaToolStripMenuItem_Click);
+ //
+ // useComponentSelectorToolStripMenuItem
+ //
+ this.useComponentSelectorToolStripMenuItem.Name = "useComponentSelectorToolStripMenuItem";
+ this.useComponentSelectorToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
+ this.useComponentSelectorToolStripMenuItem.Text = "Use Component Selector";
+ this.useComponentSelectorToolStripMenuItem.Click += new System.EventHandler(this.useComponentSelectorToolStripMenuItem_Click);
//
// ImageEditorBase
//
@@ -611,13 +543,8 @@
private System.Windows.Forms.ToolStripMenuItem rotate90ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem rotate90CounterClockwiseToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem rToolStripMenuItem;
- private STButton alphaChannelBtn;
- private STButton blueChannelBtn;
- private STButton greenChannelBtn;
- private STButton redChannelBtn;
private STButton saveBtn;
private System.Windows.Forms.ToolStripMenuItem reEncodeToolStripMenuItem;
- private STCheckBox toggleAlphaChk;
private System.Windows.Forms.ToolStripMenuItem displayVerticalToolStripMenuItem;
private STButton editBtn;
private System.Windows.Forms.ToolStripMenuItem generateMipmapsToolStripMenuItem;
@@ -628,6 +555,7 @@
private System.Windows.Forms.ToolStripMenuItem editInExternalProgramToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem undoToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem redoToolStripMenuItem;
- private STCheckBox componentSelector;
+ private System.Windows.Forms.ToolStripMenuItem displayAlphaToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem useComponentSelectorToolStripMenuItem;
}
}
\ No newline at end of file
diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs
index de40c8ca..56530678 100644
--- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs
+++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs
@@ -356,7 +356,7 @@ namespace Switch_Toolbox.Library.Forms
{
if (UseComponetSelector)
{
- if (toggleAlphaChk.Checked)
+ if (displayAlphaToolStripMenuItem.Checked)
BitmapExtension.SetChannel(image, ActiveTexture.RedChannel, ActiveTexture.GreenChannel, ActiveTexture.BlueChannel, ActiveTexture.AlphaChannel);
else
BitmapExtension.SetChannel(image, ActiveTexture.RedChannel, ActiveTexture.GreenChannel, ActiveTexture.BlueChannel, STChannelType.One);
@@ -682,64 +682,6 @@ namespace Switch_Toolbox.Library.Forms
ApplyEdit(pictureBoxCustom1.Image);
}
- private void ChannelBtn_Click(object sender, EventArgs e)
- {
- Button btn = (Button)sender;
-
- if (btn.Text == "R")
- {
- if (HasRedChannel) {
- HasRedChannel = false;
- redChannelBtn.BackColor = FormThemes.BaseTheme.DisabledItemColor;
- }
- else {
- HasRedChannel = true;
- redChannelBtn.BackColor = Color.FromArgb(192, 0, 0);
- }
- }
- else if (btn.Text == "B")
- {
- if (HasBlueChannel)
- {
- HasBlueChannel = false;
- blueChannelBtn.BackColor = FormThemes.BaseTheme.DisabledItemColor;
- }
- else
- {
- HasBlueChannel = true;
- blueChannelBtn.BackColor = Color.FromArgb(0, 0, 192);
- }
- }
- else if (btn.Text == "G")
- {
- if (HasGreenChannel)
- {
- HasGreenChannel = false;
- greenChannelBtn.BackColor = FormThemes.BaseTheme.DisabledItemColor;
- }
- else
- {
- HasGreenChannel = true;
- greenChannelBtn.BackColor = Color.FromArgb(0, 192, 0);
- }
- }
- else if (btn.Text == "A")
- {
- if (HasAlphaChannel)
- {
- HasAlphaChannel = false;
- alphaChannelBtn.BackColor = FormThemes.BaseTheme.DisabledItemColor;
- }
- else
- {
- HasAlphaChannel = true;
- alphaChannelBtn.BackColor = Color.Silver;
- }
- }
-
- UpdateMipDisplay();
- }
-
private void resizeToolStripMenuItem_Click(object sender, EventArgs e)
{
ImageResizeDialog resizeEditor = new ImageResizeDialog();
@@ -1070,8 +1012,18 @@ namespace Switch_Toolbox.Library.Forms
private void componentSelector_CheckedChanged(object sender, EventArgs e)
{
- UseComponetSelector = componentSelector.Checked;
+ UseComponetSelector = useComponentSelectorToolStripMenuItem.Checked;
UpdateMipDisplay();
}
+
+ private void displayAlphaToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void useComponentSelectorToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+
+ }
}
}
diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.resx b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.resx
index d18df402..c076cc16 100644
--- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.resx
+++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.resx
@@ -117,6 +117,9 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 17
+
@@ -328,9 +331,6 @@
184, 17
-
- 17, 17
-
25
diff --git a/Switch_Toolbox_Library/Runtime.cs b/Switch_Toolbox_Library/Runtime.cs
index b922647b..8df41e59 100644
--- a/Switch_Toolbox_Library/Runtime.cs
+++ b/Switch_Toolbox_Library/Runtime.cs
@@ -25,6 +25,10 @@ namespace Switch_Toolbox.Library
{
public static bool ShowPropertiesPanel = true;
public static bool DisplayVertical = false;
+
+ public static bool DisplayAlpha = true;
+ public static bool UseComponetSelector = false;
+
}
public class ObjectEditor
{