diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 23d1199a..d7e2c693 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 c608334a..8c01139e 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 bf5224fa..857ef152 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/GUI/BFRES/Materials/ShaderParams/vector3SliderPanel.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector3SliderPanel.cs index 4f27e432..6c3dbff6 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector3SliderPanel.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector3SliderPanel.cs @@ -85,6 +85,8 @@ namespace FirstPlugin.Forms public void ApplyValueSingles() { + SetColor(activeParam.Name, activeParam.ValueFloat); + activeParam.ValueFloat = new float[] { (float)barSlider1.Value, @@ -128,7 +130,12 @@ namespace FirstPlugin.Forms { ColorDialog colorDialog = new ColorDialog(); colorDialog.Color = pictureBox1.BackColor; - colorDialog.ShowDialog(); + if (colorDialog.ShowDialog() == DialogResult.OK) + { + barSlider1.Value = colorDialog.Color.R / 255; + barSlider2.Value = colorDialog.Color.G / 255; + barSlider3.Value = colorDialog.Color.B / 255; + } } } } diff --git a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.Designer.cs index 97ebdf16..ca373b7b 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.Designer.cs @@ -45,7 +45,7 @@ this.alphaPB.Size = new System.Drawing.Size(71, 16); this.alphaPB.TabIndex = 6; this.alphaPB.TabStop = false; - this.alphaPB.Click += new System.EventHandler(this.pictureBox1_Click); + this.alphaPB.Click += new System.EventHandler(this.alphaPB_Click); // // colorPB // @@ -54,6 +54,7 @@ this.colorPB.Size = new System.Drawing.Size(63, 16); this.colorPB.TabIndex = 7; this.colorPB.TabStop = false; + this.colorPB.Click += new System.EventHandler(this.colorPB_Click); // // barSlider4 // @@ -65,6 +66,7 @@ this.barSlider4.BarPenColorMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); this.barSlider4.BarPenColorTop = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); this.barSlider4.BorderRoundRectSize = new System.Drawing.Size(32, 32); + this.barSlider4.DataType = null; this.barSlider4.DrawSemitransparentThumb = false; this.barSlider4.ElapsedInnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); this.barSlider4.ElapsedPenColorBottom = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); @@ -72,6 +74,7 @@ this.barSlider4.ElapsedPenColorTop = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); this.barSlider4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F); this.barSlider4.ForeColor = System.Drawing.Color.White; + this.barSlider4.IncrementAmount = 0.01F; this.barSlider4.InputName = "W"; this.barSlider4.LargeChange = 5F; this.barSlider4.Location = new System.Drawing.Point(141, 72); @@ -109,6 +112,7 @@ this.barSlider3.BarPenColorMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); this.barSlider3.BarPenColorTop = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); this.barSlider3.BorderRoundRectSize = new System.Drawing.Size(32, 32); + this.barSlider3.DataType = null; this.barSlider3.DrawSemitransparentThumb = false; this.barSlider3.ElapsedInnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); this.barSlider3.ElapsedPenColorBottom = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); @@ -116,6 +120,7 @@ this.barSlider3.ElapsedPenColorTop = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); this.barSlider3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F); this.barSlider3.ForeColor = System.Drawing.Color.White; + this.barSlider3.IncrementAmount = 0.01F; this.barSlider3.InputName = "Z"; this.barSlider3.LargeChange = 5F; this.barSlider3.Location = new System.Drawing.Point(3, 72); @@ -153,6 +158,7 @@ this.barSlider2.BarPenColorMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); this.barSlider2.BarPenColorTop = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); this.barSlider2.BorderRoundRectSize = new System.Drawing.Size(32, 32); + this.barSlider2.DataType = null; this.barSlider2.DrawSemitransparentThumb = false; this.barSlider2.ElapsedInnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); this.barSlider2.ElapsedPenColorBottom = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); @@ -160,6 +166,7 @@ this.barSlider2.ElapsedPenColorTop = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); this.barSlider2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F); this.barSlider2.ForeColor = System.Drawing.Color.White; + this.barSlider2.IncrementAmount = 0.01F; this.barSlider2.InputName = "Y"; this.barSlider2.LargeChange = 5F; this.barSlider2.Location = new System.Drawing.Point(141, 46); @@ -197,6 +204,7 @@ this.barSlider1.BarPenColorMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45))))); this.barSlider1.BarPenColorTop = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); this.barSlider1.BorderRoundRectSize = new System.Drawing.Size(32, 32); + this.barSlider1.DataType = null; this.barSlider1.DrawSemitransparentThumb = false; this.barSlider1.ElapsedInnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); this.barSlider1.ElapsedPenColorBottom = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); @@ -204,6 +212,7 @@ this.barSlider1.ElapsedPenColorTop = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); this.barSlider1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F); this.barSlider1.ForeColor = System.Drawing.Color.White; + this.barSlider1.IncrementAmount = 0.01F; this.barSlider1.InputName = "X"; this.barSlider1.LargeChange = 5F; this.barSlider1.Location = new System.Drawing.Point(3, 46); @@ -230,6 +239,7 @@ this.barSlider1.UseInterlapsedBar = false; this.barSlider1.Value = 30F; this.barSlider1.ValueChanged += new System.EventHandler(this.barSlider_ValueChanged); + this.barSlider1.Scroll += new System.Windows.Forms.ScrollEventHandler(this.barSlider1_Scroll); // // vector4SliderPanel // diff --git a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.cs index 94c33b60..30a1bf77 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.cs @@ -3,6 +3,7 @@ using System.Drawing; using Switch_Toolbox.Library; using Syroot.NintenTools.NSW.Bfres; using Bfres.Structs; +using System.Windows.Forms; namespace FirstPlugin.Forms { @@ -116,6 +117,8 @@ namespace FirstPlugin.Forms public void ApplyValueSingles() { + SetColor(activeParam.Name, activeParam.ValueFloat); + activeParam.ValueFloat = new float[] { (float)barSlider1.Value, @@ -159,7 +162,29 @@ namespace FirstPlugin.Forms OnPanelChanged(activeParam, this); } - private void pictureBox1_Click(object sender, EventArgs e) + private void colorPB_Click(object sender, EventArgs e) + { + ColorDialog colorDialog = new ColorDialog(); + colorDialog.Color = colorPB.BackColor; + if (colorDialog.ShowDialog() == DialogResult.OK) + { + barSlider1.Value = colorDialog.Color.R / 255; + barSlider2.Value = colorDialog.Color.G / 255; + barSlider3.Value = colorDialog.Color.B / 255; + } + } + + private void alphaPB_Click(object sender, EventArgs e) + { + ColorDialog colorDialog = new ColorDialog(); + colorDialog.Color = alphaPB.BackColor; + if (colorDialog.ShowDialog() == DialogResult.OK) + { + barSlider4.Value = colorDialog.Color.R / 255; + } + } + + private void barSlider1_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) { } diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index dfb8b496..71a84be5 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll index 14d9601b..70ba2274 100644 Binary files a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll and b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll differ diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb index c17f9ad0..d38a9b9d 100644 Binary files a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb and b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache index 237ca688..e19e8c24 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache differ