1
0
mirror of synced 2025-01-31 12:23:52 +01:00

Cleanup some settings

This commit is contained in:
KillzXGaming 2019-05-04 13:47:55 -04:00
parent 6a7fe523e3
commit f4a43827a2
10 changed files with 50 additions and 156 deletions

Binary file not shown.

View File

@ -967,6 +967,8 @@ namespace FirstPlugin
public void UpdateEditor() public void UpdateEditor()
{ {
OnPropertyChanged();
if (Parent != null && Parent.Parent != null && Parent.Parent is BFRES) if (Parent != null && Parent.Parent != null && Parent.Parent is BFRES)
{ {
((BFRES)Parent.Parent).LoadEditors(this); ((BFRES)Parent.Parent).LoadEditors(this);

View File

@ -184,6 +184,12 @@ namespace Switch_Toolbox.Library
case "ShowPropertiesPanel": case "ShowPropertiesPanel":
bool.TryParse(node.InnerText, out Runtime.ImageEditor.ShowPropertiesPanel); bool.TryParse(node.InnerText, out Runtime.ImageEditor.ShowPropertiesPanel);
break; 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); parentNode.AppendChild(PathsNode);
PathsNode.AppendChild(createNode(doc, "DisplayVertical", Runtime.ImageEditor.DisplayVertical.ToString())); PathsNode.AppendChild(createNode(doc, "DisplayVertical", Runtime.ImageEditor.DisplayVertical.ToString()));
PathsNode.AppendChild(createNode(doc, "ShowPropertiesPanel", Runtime.ImageEditor.ShowPropertiesPanel.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) private static void AppendPathSettings(XmlDocument doc, XmlNode parentNode)
{ {

View File

@ -33,15 +33,12 @@
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.stPanel2 = new Switch_Toolbox.Library.Forms.STPanel(); this.stPanel2 = new Switch_Toolbox.Library.Forms.STPanel();
this.stPanel1 = 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.stPanel4 = new Switch_Toolbox.Library.Forms.STPanel();
this.pictureBoxCustom1 = new Switch_Toolbox.Library.Forms.PictureBoxCustom(); this.pictureBoxCustom1 = new Switch_Toolbox.Library.Forms.PictureBoxCustom();
this.stContextMenuStrip2 = new Switch_Toolbox.Library.Forms.STContextMenuStrip(this.components); this.stContextMenuStrip2 = new Switch_Toolbox.Library.Forms.STContextMenuStrip(this.components);
this.copyImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.copyImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.blueChannelBtn = new Switch_Toolbox.Library.Forms.STButton();
this.stPanel3 = new Switch_Toolbox.Library.Forms.STPanel(); this.stPanel3 = new Switch_Toolbox.Library.Forms.STPanel();
this.editBtn = new Switch_Toolbox.Library.Forms.STButton(); 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.saveBtn = new Switch_Toolbox.Library.Forms.STButton();
this.arrayLevelCounterLabel = new Switch_Toolbox.Library.Forms.STLabel(); this.arrayLevelCounterLabel = new Switch_Toolbox.Library.Forms.STLabel();
this.BtmMipsLeft = new Switch_Toolbox.Library.Forms.STButton(); this.BtmMipsLeft = new Switch_Toolbox.Library.Forms.STButton();
@ -49,9 +46,7 @@
this.btnRightArray = new Switch_Toolbox.Library.Forms.STButton(); this.btnRightArray = new Switch_Toolbox.Library.Forms.STButton();
this.BtnMipsRight = new Switch_Toolbox.Library.Forms.STButton(); this.BtnMipsRight = new Switch_Toolbox.Library.Forms.STButton();
this.btnLeftArray = 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.imageBGComboBox = new Switch_Toolbox.Library.Forms.STComboBox();
this.redChannelBtn = new Switch_Toolbox.Library.Forms.STButton();
this.stContextMenuStrip1 = new Switch_Toolbox.Library.Forms.STMenuStrip(); this.stContextMenuStrip1 = new Switch_Toolbox.Library.Forms.STMenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -75,7 +70,8 @@
this.adjustmentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.adjustmentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.hueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.hueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.brightnessContrastToolStripMenuItem = 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(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.splitContainer1.SuspendLayout();
@ -119,13 +115,9 @@
// //
// stPanel1 // stPanel1
// //
this.stPanel1.Controls.Add(this.alphaChannelBtn);
this.stPanel1.Controls.Add(this.stPanel4); this.stPanel1.Controls.Add(this.stPanel4);
this.stPanel1.Controls.Add(this.blueChannelBtn);
this.stPanel1.Controls.Add(this.stPanel3); this.stPanel1.Controls.Add(this.stPanel3);
this.stPanel1.Controls.Add(this.greenChannelBtn);
this.stPanel1.Controls.Add(this.imageBGComboBox); this.stPanel1.Controls.Add(this.imageBGComboBox);
this.stPanel1.Controls.Add(this.redChannelBtn);
this.stPanel1.Controls.Add(this.stContextMenuStrip1); this.stPanel1.Controls.Add(this.stContextMenuStrip1);
this.stPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.stPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.stPanel1.Location = new System.Drawing.Point(0, 0); this.stPanel1.Location = new System.Drawing.Point(0, 0);
@ -133,18 +125,6 @@
this.stPanel1.Size = new System.Drawing.Size(520, 502); this.stPanel1.Size = new System.Drawing.Size(520, 502);
this.stPanel1.TabIndex = 2; 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 // stPanel4
// //
this.stPanel4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 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.Text = "Copy Image";
this.copyImageToolStripMenuItem.Click += new System.EventHandler(this.copyImageToolStripMenuItem_Click); 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 // stPanel3
// //
this.stPanel3.Controls.Add(this.componentSelector);
this.stPanel3.Controls.Add(this.editBtn); this.stPanel3.Controls.Add(this.editBtn);
this.stPanel3.Controls.Add(this.toggleAlphaChk);
this.stPanel3.Controls.Add(this.saveBtn); this.stPanel3.Controls.Add(this.saveBtn);
this.stPanel3.Controls.Add(this.arrayLevelCounterLabel); this.stPanel3.Controls.Add(this.arrayLevelCounterLabel);
this.stPanel3.Controls.Add(this.BtmMipsLeft); this.stPanel3.Controls.Add(this.BtmMipsLeft);
@ -227,19 +193,6 @@
this.editBtn.UseVisualStyleBackColor = false; this.editBtn.UseVisualStyleBackColor = false;
this.editBtn.Click += new System.EventHandler(this.editBtn_Click); 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 // saveBtn
// //
this.saveBtn.BackColor = System.Drawing.Color.Transparent; this.saveBtn.BackColor = System.Drawing.Color.Transparent;
@ -318,18 +271,6 @@
this.btnLeftArray.UseVisualStyleBackColor = true; this.btnLeftArray.UseVisualStyleBackColor = true;
this.btnLeftArray.Click += new System.EventHandler(this.btnLeftArray_Click); 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 // imageBGComboBox
// //
this.imageBGComboBox.BorderColor = System.Drawing.Color.Empty; this.imageBGComboBox.BorderColor = System.Drawing.Color.Empty;
@ -343,18 +284,6 @@
this.imageBGComboBox.TabIndex = 2; this.imageBGComboBox.TabIndex = 2;
this.imageBGComboBox.SelectedIndexChanged += new System.EventHandler(this.imageBGComboBox_SelectedIndexChanged); 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 // stContextMenuStrip1
// //
this.stContextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.stContextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -427,7 +356,9 @@
// //
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.propertyGridToolStripMenuItem, this.propertyGridToolStripMenuItem,
this.displayVerticalToolStripMenuItem}); this.displayVerticalToolStripMenuItem,
this.displayAlphaToolStripMenuItem,
this.useComponentSelectorToolStripMenuItem});
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.viewToolStripMenuItem.Text = "View"; this.viewToolStripMenuItem.Text = "View";
@ -438,7 +369,7 @@
this.propertyGridToolStripMenuItem.CheckOnClick = true; this.propertyGridToolStripMenuItem.CheckOnClick = true;
this.propertyGridToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.propertyGridToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
this.propertyGridToolStripMenuItem.Name = "propertyGridToolStripMenuItem"; 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.Text = "Property Grid";
this.propertyGridToolStripMenuItem.CheckedChanged += new System.EventHandler(this.propertyGridToolStripMenuItem_CheckedChanged); this.propertyGridToolStripMenuItem.CheckedChanged += new System.EventHandler(this.propertyGridToolStripMenuItem_CheckedChanged);
this.propertyGridToolStripMenuItem.Click += new System.EventHandler(this.propertyGridToolStripMenuItem_Click); this.propertyGridToolStripMenuItem.Click += new System.EventHandler(this.propertyGridToolStripMenuItem_Click);
@ -446,7 +377,7 @@
// displayVerticalToolStripMenuItem // displayVerticalToolStripMenuItem
// //
this.displayVerticalToolStripMenuItem.Name = "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.Text = "Display Vertical";
this.displayVerticalToolStripMenuItem.CheckedChanged += new System.EventHandler(this.displayVerticalToolStripMenuItem_CheckedChanged); this.displayVerticalToolStripMenuItem.CheckedChanged += new System.EventHandler(this.displayVerticalToolStripMenuItem_CheckedChanged);
this.displayVerticalToolStripMenuItem.Click += new System.EventHandler(this.displayVerticalToolStripMenuItem_Click); this.displayVerticalToolStripMenuItem.Click += new System.EventHandler(this.displayVerticalToolStripMenuItem_Click);
@ -546,18 +477,19 @@
this.brightnessContrastToolStripMenuItem.Size = new System.Drawing.Size(185, 22); this.brightnessContrastToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
this.brightnessContrastToolStripMenuItem.Text = "Brightness / Contrast"; this.brightnessContrastToolStripMenuItem.Text = "Brightness / Contrast";
// //
// componentSelector // displayAlphaToolStripMenuItem
// //
this.componentSelector.AutoSize = true; this.displayAlphaToolStripMenuItem.Name = "displayAlphaToolStripMenuItem";
this.componentSelector.Checked = true; this.displayAlphaToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
this.componentSelector.CheckState = System.Windows.Forms.CheckState.Checked; this.displayAlphaToolStripMenuItem.Text = "Display Alpha";
this.componentSelector.Location = new System.Drawing.Point(174, 7); this.displayAlphaToolStripMenuItem.Click += new System.EventHandler(this.displayAlphaToolStripMenuItem_Click);
this.componentSelector.Name = "componentSelector"; //
this.componentSelector.Size = new System.Drawing.Size(144, 17); // useComponentSelectorToolStripMenuItem
this.componentSelector.TabIndex = 17; //
this.componentSelector.Text = "Use Component Selector"; this.useComponentSelectorToolStripMenuItem.Name = "useComponentSelectorToolStripMenuItem";
this.componentSelector.UseVisualStyleBackColor = true; this.useComponentSelectorToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
this.componentSelector.CheckedChanged += new System.EventHandler(this.componentSelector_CheckedChanged); this.useComponentSelectorToolStripMenuItem.Text = "Use Component Selector";
this.useComponentSelectorToolStripMenuItem.Click += new System.EventHandler(this.useComponentSelectorToolStripMenuItem_Click);
// //
// ImageEditorBase // ImageEditorBase
// //
@ -611,13 +543,8 @@
private System.Windows.Forms.ToolStripMenuItem rotate90ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem rotate90ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem rotate90CounterClockwiseToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem rotate90CounterClockwiseToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem rToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem rToolStripMenuItem;
private STButton alphaChannelBtn;
private STButton blueChannelBtn;
private STButton greenChannelBtn;
private STButton redChannelBtn;
private STButton saveBtn; private STButton saveBtn;
private System.Windows.Forms.ToolStripMenuItem reEncodeToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem reEncodeToolStripMenuItem;
private STCheckBox toggleAlphaChk;
private System.Windows.Forms.ToolStripMenuItem displayVerticalToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem displayVerticalToolStripMenuItem;
private STButton editBtn; private STButton editBtn;
private System.Windows.Forms.ToolStripMenuItem generateMipmapsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem generateMipmapsToolStripMenuItem;
@ -628,6 +555,7 @@
private System.Windows.Forms.ToolStripMenuItem editInExternalProgramToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem editInExternalProgramToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem undoToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem undoToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem redoToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem redoToolStripMenuItem;
private STCheckBox componentSelector; private System.Windows.Forms.ToolStripMenuItem displayAlphaToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem useComponentSelectorToolStripMenuItem;
} }
} }

View File

@ -356,7 +356,7 @@ namespace Switch_Toolbox.Library.Forms
{ {
if (UseComponetSelector) if (UseComponetSelector)
{ {
if (toggleAlphaChk.Checked) if (displayAlphaToolStripMenuItem.Checked)
BitmapExtension.SetChannel(image, ActiveTexture.RedChannel, ActiveTexture.GreenChannel, ActiveTexture.BlueChannel, ActiveTexture.AlphaChannel); BitmapExtension.SetChannel(image, ActiveTexture.RedChannel, ActiveTexture.GreenChannel, ActiveTexture.BlueChannel, ActiveTexture.AlphaChannel);
else else
BitmapExtension.SetChannel(image, ActiveTexture.RedChannel, ActiveTexture.GreenChannel, ActiveTexture.BlueChannel, STChannelType.One); BitmapExtension.SetChannel(image, ActiveTexture.RedChannel, ActiveTexture.GreenChannel, ActiveTexture.BlueChannel, STChannelType.One);
@ -682,64 +682,6 @@ namespace Switch_Toolbox.Library.Forms
ApplyEdit(pictureBoxCustom1.Image); 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) private void resizeToolStripMenuItem_Click(object sender, EventArgs e)
{ {
ImageResizeDialog resizeEditor = new ImageResizeDialog(); ImageResizeDialog resizeEditor = new ImageResizeDialog();
@ -1070,8 +1012,18 @@ namespace Switch_Toolbox.Library.Forms
private void componentSelector_CheckedChanged(object sender, EventArgs e) private void componentSelector_CheckedChanged(object sender, EventArgs e)
{ {
UseComponetSelector = componentSelector.Checked; UseComponetSelector = useComponentSelectorToolStripMenuItem.Checked;
UpdateMipDisplay(); UpdateMipDisplay();
} }
private void displayAlphaToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void useComponentSelectorToolStripMenuItem_Click(object sender, EventArgs e)
{
}
} }
} }

View File

@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="stContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBoxCustom1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="pictureBoxCustom1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
@ -328,9 +331,6 @@
<metadata name="stContextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="stContextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>184, 17</value> <value>184, 17</value>
</metadata> </metadata>
<metadata name="stContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value> <value>25</value>
</metadata> </metadata>

View File

@ -25,6 +25,10 @@ namespace Switch_Toolbox.Library
{ {
public static bool ShowPropertiesPanel = true; public static bool ShowPropertiesPanel = true;
public static bool DisplayVertical = false; public static bool DisplayVertical = false;
public static bool DisplayAlpha = true;
public static bool UseComponetSelector = false;
} }
public class ObjectEditor public class ObjectEditor
{ {