diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index d55469b4..c3d16c03 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 970126d0..205cc04b 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 08fd5f05..4af1fe32 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/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index c67e5d44..55fec23d 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/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index 1e828859..0f8e1293 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache differ diff --git a/Switch_Toolbox_Library/FileFormats/Assimp/AssimpSaver.cs b/Switch_Toolbox_Library/FileFormats/Assimp/AssimpSaver.cs index 51028ce0..ed43a689 100644 --- a/Switch_Toolbox_Library/FileFormats/Assimp/AssimpSaver.cs +++ b/Switch_Toolbox_Library/FileFormats/Assimp/AssimpSaver.cs @@ -135,7 +135,6 @@ namespace Switch_Toolbox.Library private void SaveMaterials(Scene scene, STGenericModel model, string FileName, List Textures) { - string TextureExtension = ".png"; string TexturePath = System.IO.Path.GetDirectoryName(FileName); @@ -146,7 +145,6 @@ namespace Switch_Toolbox.Library var bitmap = tex.GetBitmap(); bitmap.Save(path); bitmap.Dispose(); - } foreach (var mat in model.Nodes[1].Nodes) @@ -160,6 +158,7 @@ namespace Switch_Toolbox.Library { TextureSlot slot = new TextureSlot(); string path = System.IO.Path.Combine(TexturePath, tex.Name + TextureExtension); + slot.FilePath = path; slot.UVIndex = 0; slot.Flags = 0; diff --git a/Switch_Toolbox_Library/Forms/Custom/STContextMenuStrip.cs b/Switch_Toolbox_Library/Forms/Custom/STContextMenuStrip.cs index 491733d7..dd53da1e 100644 --- a/Switch_Toolbox_Library/Forms/Custom/STContextMenuStrip.cs +++ b/Switch_Toolbox_Library/Forms/Custom/STContextMenuStrip.cs @@ -62,6 +62,18 @@ namespace Switch_Toolbox.Library.Forms this.Renderer = new MenuRenderer(); } } + + public STContextMenuStrip(IContainer container) + { + this.ForeColor = FormThemes.BaseTheme.FormContextMenuForeColor; + + if (FormThemes.ActivePreset != FormThemes.Preset.White) + { + this.BackColor = titlebarBackColor; + this.ForeColor = titlebarForeColor; + this.Renderer = new MenuRenderer(); + } + } } public class MenuRenderer : ToolStripProfessionalRenderer diff --git a/Switch_Toolbox_Library/Forms/Custom/STForm.cs b/Switch_Toolbox_Library/Forms/Custom/STForm.cs index 331f786a..61f9ce83 100644 --- a/Switch_Toolbox_Library/Forms/Custom/STForm.cs +++ b/Switch_Toolbox_Library/Forms/Custom/STForm.cs @@ -129,6 +129,7 @@ namespace Switch_Toolbox.Library.Forms this.TitleBar.Name = "TitleBar"; this.TitleBar.Size = new System.Drawing.Size(543, 25); this.TitleBar.TabIndex = 10; + this.TitleBar.DoubleClick += new System.EventHandler(this.TitleBar_DoubleClick); this.TitleBar.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TitleBar_MouseDown); // // LblTitle @@ -397,6 +398,14 @@ namespace Switch_Toolbox.Library.Forms Rectangle Top { get { return new Rectangle(0, 0, this.ClientSize.Width, BorderSize); } } Rectangle Left { get { return new Rectangle(0, 0, BorderSize, this.ClientSize.Height); } } + private void TitleBar_DoubleClick(object sender, EventArgs e) + { + if (canResize) + { + Maximize(); + } + } + Rectangle Bottom { get { return new Rectangle(0, this.ClientSize.Height - BorderSize, this.ClientSize.Width, BorderSize); } } Rectangle Right { get { return new Rectangle(this.ClientSize.Width - BorderSize, 0, BorderSize, this.ClientSize.Height); } } diff --git a/Toolbox/MainForm.Designer.cs b/Toolbox/MainForm.Designer.cs index 70d4bac7..b6665f17 100644 --- a/Toolbox/MainForm.Designer.cs +++ b/Toolbox/MainForm.Designer.cs @@ -56,7 +56,7 @@ this.creditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.stPanel1 = new Switch_Toolbox.Library.Forms.STPanel(); this.tabForms = new Switch_Toolbox.Library.Forms.STTabControl(); - this.tabControlContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); + this.tabControlContextMenuStrip = new Switch_Toolbox.Library.Forms.STContextMenuStrip(this.components); this.closeToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.stPanel2 = new Switch_Toolbox.Library.Forms.STPanel(); this.BtnMdiMinimize = new System.Windows.Forms.PictureBox(); @@ -289,6 +289,7 @@ this.tabForms.TabIndex = 9; this.tabForms.Visible = false; this.tabForms.SelectedIndexChanged += new System.EventHandler(this.tabForms_SelectedIndexChanged); + this.tabForms.MouseClick += new System.Windows.Forms.MouseEventHandler(this.tabForms_MouseClick); // // tabControlContextMenuStrip // @@ -456,7 +457,7 @@ private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem; - private System.Windows.Forms.ContextMenuStrip tabControlContextMenuStrip; + private Switch_Toolbox.Library.Forms.STContextMenuStrip tabControlContextMenuStrip; private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem fileAssociationsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem mainSettingsToolStripMenuItem; diff --git a/Toolbox/MainForm.cs b/Toolbox/MainForm.cs index dbde328a..34e8475c 100644 --- a/Toolbox/MainForm.cs +++ b/Toolbox/MainForm.cs @@ -792,6 +792,7 @@ namespace Toolbox { if (child == tabForms.SelectedTab.Tag) { + OnMdiWindowClosed(); child.Close(); return; } @@ -1045,5 +1046,13 @@ namespace Toolbox private void updateToolstrip_Click(object sender, EventArgs e) { UpdateNotifcationClick(); } + + private void tabForms_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Right) + { + this.tabControlContextMenuStrip.Show(this.tabForms, e.Location); + } + } } }