diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 86545353..807816f6 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 87602614..46a1359f 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 7c288fea..2a326412 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_Toolbox_Library/Forms/Editors/ImageEditor/CubeMapFaceViewer.Designer.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/CubeMapFaceViewer.Designer.cs index 1dac86ff..415c5dc6 100644 --- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/CubeMapFaceViewer.Designer.cs +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/CubeMapFaceViewer.Designer.cs @@ -38,6 +38,7 @@ this.btnRightArray = new Switch_Toolbox.Library.Forms.STButton(); this.btnLeftArray = new Switch_Toolbox.Library.Forms.STButton(); this.pbRightFace = new Switch_Toolbox.Library.Forms.PictureBoxCustom(); + this.chkDisplayAlpha = new Switch_Toolbox.Library.Forms.STCheckBox(); this.contentContainer.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbTopFace)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbFrontFace)).BeginInit(); @@ -50,6 +51,7 @@ // contentContainer // this.contentContainer.BackColor = System.Drawing.Color.White; + this.contentContainer.Controls.Add(this.chkDisplayAlpha); this.contentContainer.Controls.Add(this.arrayLevelCounterLabel); this.contentContainer.Controls.Add(this.btnRightArray); this.contentContainer.Controls.Add(this.btnLeftArray); @@ -69,6 +71,7 @@ this.contentContainer.Controls.SetChildIndex(this.btnLeftArray, 0); this.contentContainer.Controls.SetChildIndex(this.btnRightArray, 0); this.contentContainer.Controls.SetChildIndex(this.arrayLevelCounterLabel, 0); + this.contentContainer.Controls.SetChildIndex(this.chkDisplayAlpha, 0); // // pbTopFace // @@ -167,6 +170,17 @@ this.pbRightFace.TabIndex = 20; this.pbRightFace.TabStop = false; // + // chkDisplayAlpha + // + this.chkDisplayAlpha.AutoSize = true; + this.chkDisplayAlpha.Location = new System.Drawing.Point(421, 94); + this.chkDisplayAlpha.Name = "chkDisplayAlpha"; + this.chkDisplayAlpha.Size = new System.Drawing.Size(90, 17); + this.chkDisplayAlpha.TabIndex = 21; + this.chkDisplayAlpha.Text = "Display Alpha"; + this.chkDisplayAlpha.UseVisualStyleBackColor = true; + this.chkDisplayAlpha.CheckedChanged += new System.EventHandler(this.chkDisplayAlpha_CheckedChanged); + // // CubeMapFaceViewer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -198,5 +212,6 @@ private STButton btnRightArray; private STButton btnLeftArray; private PictureBoxCustom pbRightFace; + private STCheckBox chkDisplayAlpha; } } \ No newline at end of file diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/CubeMapFaceViewer.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/CubeMapFaceViewer.cs index a333477b..e68ef9bc 100644 --- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/CubeMapFaceViewer.cs +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/CubeMapFaceViewer.cs @@ -12,6 +12,8 @@ namespace Switch_Toolbox.Library.Forms { public partial class CubeMapFaceViewer : STForm { + private bool DisplayAlpha = true; + public CubeMapFaceViewer() { InitializeComponent(); @@ -28,6 +30,7 @@ namespace Switch_Toolbox.Library.Forms pbLeftFace.Paint += CreatePictureBoxText("Left"); pbTopFace.Paint += CreatePictureBoxText("Top"); pbBottomFace.Paint += CreatePictureBoxText("Bottom"); + chkDisplayAlpha.Checked = DisplayAlpha; } private PaintEventHandler CreatePictureBoxText(string Text) @@ -65,9 +68,14 @@ namespace Switch_Toolbox.Library.Forms private void UpdateArrayLevel(int ArrayLevel = 0) { + if (ActiveTexture == null) return; + for (int i = 0; i < 6; i++) { var CubeFaceBitmap = ActiveTexture.GetBitmap(i * (ArrayLevel + 1)); + if (!DisplayAlpha) + BitmapExtension.SetChannel(CubeFaceBitmap, ActiveTexture.RedChannel, ActiveTexture.GreenChannel, ActiveTexture.BlueChannel, STChannelType.One); + if (i == FRONT_FACE) pbFrontFace.Image = CubeFaceBitmap; else if (i == BACK_FACE) @@ -82,5 +90,11 @@ namespace Switch_Toolbox.Library.Forms pbRightFace.Image = CubeFaceBitmap; } } + + private void chkDisplayAlpha_CheckedChanged(object sender, EventArgs e) + { + DisplayAlpha = chkDisplayAlpha.Checked; + UpdateArrayLevel(); + } } }