From 5dd8aed3c90e0592e0c065185319c1adb375993a Mon Sep 17 00:00:00 2001 From: MattNL Date: Tue, 16 Aug 2022 03:24:03 -0400 Subject: [PATCH 01/18] made some controls public in AddCategory So the AddCategory popup dialog can be recycled elsewhere in the program with the ability to change the text within it --- .../Forms/Additional-Popups/Audio/addCategory.Designer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PCK-Studio/Forms/Additional-Popups/Audio/addCategory.Designer.cs b/PCK-Studio/Forms/Additional-Popups/Audio/addCategory.Designer.cs index cb7dbe12..0f8eb007 100644 --- a/PCK-Studio/Forms/Additional-Popups/Audio/addCategory.Designer.cs +++ b/PCK-Studio/Forms/Additional-Popups/Audio/addCategory.Designer.cs @@ -87,9 +87,9 @@ } #endregion - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Button button1; private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.Button cancelButton; + public System.Windows.Forms.Label label2; + public System.Windows.Forms.Button button1; } } \ No newline at end of file From f037a362c7823f9933c3130bee4a7f38eabc0420 Mon Sep 17 00:00:00 2001 From: MattNL Date: Tue, 16 Aug 2022 05:32:00 -0400 Subject: [PATCH 02/18] Added Skin Presets to ANIM Editor --- .../Utilities/Skins/ANIMEditor.Designer.cs | 1314 +++++++++-------- .../Forms/Utilities/Skins/ANIMEditor.cs | 76 + 2 files changed, 748 insertions(+), 642 deletions(-) diff --git a/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.Designer.cs b/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.Designer.cs index 0d59dd62..347f643b 100644 --- a/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.Designer.cs +++ b/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.Designer.cs @@ -28,677 +28,705 @@ /// private void InitializeComponent() { - this.closeButton = new MetroFramework.Controls.MetroButton(); - this.effectsGroup = new System.Windows.Forms.GroupBox(); - this.rightLegOCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.headOCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.leftLegOCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.rightArmOCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.leftArmOCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.bodyOCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.rightLegCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.slimCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.headCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.leftLegCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.rightArmCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.leftArmCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.bodyCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.classicCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.effectsGroup2 = new System.Windows.Forms.GroupBox(); - this.rightLeggingCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.helmetCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.leftLeggingCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.rightArmorCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.leftArmorCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.chestplateCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.unknownCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.crouchCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.dinnerboneCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.noArmorCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.bobbingCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.santaCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.syncLegsCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.staticArmsCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.syncArmsCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.statueCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.zombieCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.staticLegsCheckBox = new MetroFramework.Controls.MetroCheckBox(); - this.copyButton = new MetroFramework.Controls.MetroButton(); - this.importButton = new MetroFramework.Controls.MetroButton(); - this.exportButton = new MetroFramework.Controls.MetroButton(); - this.animValue = new MetroFramework.Controls.MetroLabel(); - this.uncheckButton = new MetroFramework.Controls.MetroButton(); - this.checkButton = new MetroFramework.Controls.MetroButton(); - this.toolTip = new MetroFramework.Components.MetroToolTip(); - this.effectsGroup.SuspendLayout(); - this.effectsGroup2.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.SuspendLayout(); - // - // closeButton - // - this.closeButton.Location = new System.Drawing.Point(257, 527); - this.closeButton.Name = "closeButton"; - this.closeButton.Size = new System.Drawing.Size(126, 23); - this.closeButton.TabIndex = 1; - this.closeButton.Text = "Save"; - this.closeButton.Theme = MetroFramework.MetroThemeStyle.Dark; - this.closeButton.UseSelectable = true; - this.closeButton.Click += new System.EventHandler(this.closeButton_Click); - // - // effectsGroup - // - this.effectsGroup.Controls.Add(this.rightLegOCheckBox); - this.effectsGroup.Controls.Add(this.headOCheckBox); - this.effectsGroup.Controls.Add(this.leftLegOCheckBox); - this.effectsGroup.Controls.Add(this.rightArmOCheckBox); - this.effectsGroup.Controls.Add(this.leftArmOCheckBox); - this.effectsGroup.Controls.Add(this.bodyOCheckBox); - this.effectsGroup.Controls.Add(this.rightLegCheckBox); - this.effectsGroup.Controls.Add(this.slimCheckBox); - this.effectsGroup.Controls.Add(this.headCheckBox); - this.effectsGroup.Controls.Add(this.leftLegCheckBox); - this.effectsGroup.Controls.Add(this.rightArmCheckBox); - this.effectsGroup.Controls.Add(this.leftArmCheckBox); - this.effectsGroup.Controls.Add(this.bodyCheckBox); - this.effectsGroup.Controls.Add(this.classicCheckBox); - this.effectsGroup.ForeColor = System.Drawing.SystemColors.Window; - this.effectsGroup.Location = new System.Drawing.Point(23, 140); - this.effectsGroup.Name = "effectsGroup"; - this.effectsGroup.Size = new System.Drawing.Size(408, 238); - this.effectsGroup.TabIndex = 2; - this.effectsGroup.TabStop = false; - this.effectsGroup.Text = "Skin Flags"; - // - // rightLegOCheckBox - // - this.rightLegOCheckBox.AutoSize = true; - this.rightLegOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.rightLegOCheckBox.Location = new System.Drawing.Point(180, 208); - this.rightLegOCheckBox.Name = "rightLegOCheckBox"; - this.rightLegOCheckBox.Size = new System.Drawing.Size(213, 19); - this.rightLegOCheckBox.TabIndex = 13; - this.rightLegOCheckBox.Text = "Remove Right Leg Overlay Box"; - this.rightLegOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.rightLegOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.closeButton = new MetroFramework.Controls.MetroButton(); + this.effectsGroup = new System.Windows.Forms.GroupBox(); + this.rightLegOCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.headOCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.leftLegOCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.leftArmOCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.bodyOCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.rightLegCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.slimCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.headCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.leftLegCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.rightArmCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.leftArmCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.bodyCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.classicCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.rightArmOCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.effectsGroup2 = new System.Windows.Forms.GroupBox(); + this.rightLeggingCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.helmetCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.leftLeggingCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.rightArmorCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.leftArmorCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.chestplateCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.unknownCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.crouchCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.dinnerboneCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.noArmorCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.bobbingCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.santaCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.syncLegsCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.staticArmsCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.syncArmsCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.statueCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.zombieCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.staticLegsCheckBox = new MetroFramework.Controls.MetroCheckBox(); + this.copyButton = new MetroFramework.Controls.MetroButton(); + this.importButton = new MetroFramework.Controls.MetroButton(); + this.exportButton = new MetroFramework.Controls.MetroButton(); + this.animValue = new MetroFramework.Controls.MetroLabel(); + this.uncheckButton = new MetroFramework.Controls.MetroButton(); + this.checkButton = new MetroFramework.Controls.MetroButton(); + this.toolTip = new MetroFramework.Components.MetroToolTip(); + this.resetButton = new MetroFramework.Controls.MetroButton(); + this.templateButton = new MetroFramework.Controls.MetroButton(); + this.effectsGroup.SuspendLayout(); + this.effectsGroup2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // closeButton + // + this.closeButton.Location = new System.Drawing.Point(250, 514); + this.closeButton.Name = "closeButton"; + this.closeButton.Size = new System.Drawing.Size(126, 23); + this.closeButton.TabIndex = 1; + this.closeButton.Text = "Save"; + this.closeButton.Theme = MetroFramework.MetroThemeStyle.Dark; + this.closeButton.UseSelectable = true; + this.closeButton.Click += new System.EventHandler(this.closeButton_Click); + // + // effectsGroup + // + this.effectsGroup.Controls.Add(this.rightLegOCheckBox); + this.effectsGroup.Controls.Add(this.headOCheckBox); + this.effectsGroup.Controls.Add(this.leftLegOCheckBox); + this.effectsGroup.Controls.Add(this.leftArmOCheckBox); + this.effectsGroup.Controls.Add(this.bodyOCheckBox); + this.effectsGroup.Controls.Add(this.rightLegCheckBox); + this.effectsGroup.Controls.Add(this.slimCheckBox); + this.effectsGroup.Controls.Add(this.headCheckBox); + this.effectsGroup.Controls.Add(this.leftLegCheckBox); + this.effectsGroup.Controls.Add(this.rightArmCheckBox); + this.effectsGroup.Controls.Add(this.leftArmCheckBox); + this.effectsGroup.Controls.Add(this.bodyCheckBox); + this.effectsGroup.Controls.Add(this.classicCheckBox); + this.effectsGroup.Controls.Add(this.rightArmOCheckBox); + this.effectsGroup.ForeColor = System.Drawing.SystemColors.Window; + this.effectsGroup.Location = new System.Drawing.Point(22, 148); + this.effectsGroup.Name = "effectsGroup"; + this.effectsGroup.Size = new System.Drawing.Size(393, 238); + this.effectsGroup.TabIndex = 2; + this.effectsGroup.TabStop = false; + this.effectsGroup.Text = "Skin Flags"; + // + // rightLegOCheckBox + // + this.rightLegOCheckBox.AutoSize = true; + this.rightLegOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.rightLegOCheckBox.Location = new System.Drawing.Point(180, 208); + this.rightLegOCheckBox.Name = "rightLegOCheckBox"; + this.rightLegOCheckBox.Size = new System.Drawing.Size(199, 19); + this.rightLegOCheckBox.TabIndex = 13; + this.rightLegOCheckBox.Text = "Remove Right Leg Layer Box"; + this.rightLegOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.rightLegOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.rightLegOCheckBox.UseSelectable = true; - // - // headOCheckBox - // - this.headOCheckBox.AutoSize = true; - this.headOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.headOCheckBox.Location = new System.Drawing.Point(180, 50); - this.headOCheckBox.Name = "headOCheckBox"; - this.headOCheckBox.Size = new System.Drawing.Size(187, 19); - this.headOCheckBox.TabIndex = 12; - this.headOCheckBox.Text = "Remove Head Overlay Box"; - this.headOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.headOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.rightLegOCheckBox.UseSelectable = true; + // + // headOCheckBox + // + this.headOCheckBox.AutoSize = true; + this.headOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.headOCheckBox.Location = new System.Drawing.Point(180, 50); + this.headOCheckBox.Name = "headOCheckBox"; + this.headOCheckBox.Size = new System.Drawing.Size(173, 19); + this.headOCheckBox.TabIndex = 12; + this.headOCheckBox.Text = "Remove Head Layer Box"; + this.headOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.headOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.headOCheckBox.UseSelectable = true; - // - // leftLegOCheckBox - // - this.leftLegOCheckBox.AutoSize = true; - this.leftLegOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.leftLegOCheckBox.Location = new System.Drawing.Point(180, 174); - this.leftLegOCheckBox.Name = "leftLegOCheckBox"; - this.leftLegOCheckBox.Size = new System.Drawing.Size(204, 19); - this.leftLegOCheckBox.TabIndex = 11; - this.leftLegOCheckBox.Text = "Remove Left Leg Overlay Box"; - this.leftLegOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.leftLegOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.headOCheckBox.UseSelectable = true; + // + // leftLegOCheckBox + // + this.leftLegOCheckBox.AutoSize = true; + this.leftLegOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.leftLegOCheckBox.Location = new System.Drawing.Point(180, 174); + this.leftLegOCheckBox.Name = "leftLegOCheckBox"; + this.leftLegOCheckBox.Size = new System.Drawing.Size(190, 19); + this.leftLegOCheckBox.TabIndex = 11; + this.leftLegOCheckBox.Text = "Remove Left Leg Layer Box"; + this.leftLegOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.leftLegOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.leftLegOCheckBox.UseSelectable = true; - // - // rightArmOCheckBox - // - this.rightArmOCheckBox.AutoSize = true; - this.rightArmOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.rightArmOCheckBox.Location = new System.Drawing.Point(178, 143); - this.rightArmOCheckBox.Name = "rightArmOCheckBox"; - this.rightArmOCheckBox.Size = new System.Drawing.Size(217, 19); - this.rightArmOCheckBox.TabIndex = 10; - this.rightArmOCheckBox.Text = "Remove Right Arm Overlay Box"; - this.rightArmOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.rightArmOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.leftLegOCheckBox.UseSelectable = true; + // + // leftArmOCheckBox + // + this.leftArmOCheckBox.AutoSize = true; + this.leftArmOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.leftArmOCheckBox.Location = new System.Drawing.Point(180, 112); + this.leftArmOCheckBox.Name = "leftArmOCheckBox"; + this.leftArmOCheckBox.Size = new System.Drawing.Size(194, 19); + this.leftArmOCheckBox.TabIndex = 9; + this.leftArmOCheckBox.Text = "Remove Left Arm Layer Box"; + this.leftArmOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.leftArmOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.rightArmOCheckBox.UseSelectable = true; - // - // leftArmOCheckBox - // - this.leftArmOCheckBox.AutoSize = true; - this.leftArmOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.leftArmOCheckBox.Location = new System.Drawing.Point(180, 112); - this.leftArmOCheckBox.Name = "leftArmOCheckBox"; - this.leftArmOCheckBox.Size = new System.Drawing.Size(208, 19); - this.leftArmOCheckBox.TabIndex = 9; - this.leftArmOCheckBox.Text = "Remove Left Arm Overlay Box"; - this.leftArmOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.leftArmOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.leftArmOCheckBox.UseSelectable = true; + // + // bodyOCheckBox + // + this.bodyOCheckBox.AutoSize = true; + this.bodyOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.bodyOCheckBox.Location = new System.Drawing.Point(180, 81); + this.bodyOCheckBox.Name = "bodyOCheckBox"; + this.bodyOCheckBox.Size = new System.Drawing.Size(172, 19); + this.bodyOCheckBox.TabIndex = 8; + this.bodyOCheckBox.Text = "Remove Body Layer Box"; + this.bodyOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.bodyOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.leftArmOCheckBox.UseSelectable = true; - // - // bodyOCheckBox - // - this.bodyOCheckBox.AutoSize = true; - this.bodyOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.bodyOCheckBox.Location = new System.Drawing.Point(180, 81); - this.bodyOCheckBox.Name = "bodyOCheckBox"; - this.bodyOCheckBox.Size = new System.Drawing.Size(186, 19); - this.bodyOCheckBox.TabIndex = 8; - this.bodyOCheckBox.Text = "Remove Body Overlay Box"; - this.bodyOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.bodyOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.bodyOCheckBox.UseSelectable = true; + // + // rightLegCheckBox + // + this.rightLegCheckBox.AutoSize = true; + this.rightLegCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.rightLegCheckBox.Location = new System.Drawing.Point(6, 208); + this.rightLegCheckBox.Name = "rightLegCheckBox"; + this.rightLegCheckBox.Size = new System.Drawing.Size(162, 19); + this.rightLegCheckBox.TabIndex = 7; + this.rightLegCheckBox.Text = "Remove Right Leg Box"; + this.rightLegCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.rightLegCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.bodyOCheckBox.UseSelectable = true; - // - // rightLegCheckBox - // - this.rightLegCheckBox.AutoSize = true; - this.rightLegCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.rightLegCheckBox.Location = new System.Drawing.Point(6, 208); - this.rightLegCheckBox.Name = "rightLegCheckBox"; - this.rightLegCheckBox.Size = new System.Drawing.Size(162, 19); - this.rightLegCheckBox.TabIndex = 7; - this.rightLegCheckBox.Text = "Remove Right Leg Box"; - this.rightLegCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.rightLegCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + - "or this part. Armor will be disabled for this part, but can be rendered again wi" + - "th the armor flags. "); - this.rightLegCheckBox.UseSelectable = true; - // - // slimCheckBox - // - this.slimCheckBox.AutoSize = true; - this.slimCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.slimCheckBox.Location = new System.Drawing.Point(180, 19); - this.slimCheckBox.Name = "slimCheckBox"; - this.slimCheckBox.Size = new System.Drawing.Size(151, 19); - this.slimCheckBox.TabIndex = 6; - this.slimCheckBox.Text = "64x64 Alex/Slim Skin"; - this.slimCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.slimCheckBox, " The 1.8 style skin type with slim arms, overlays for each part, and sep" + + this.rightLegCheckBox.UseSelectable = true; + // + // slimCheckBox + // + this.slimCheckBox.AutoSize = true; + this.slimCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.slimCheckBox.Location = new System.Drawing.Point(180, 19); + this.slimCheckBox.Name = "slimCheckBox"; + this.slimCheckBox.Size = new System.Drawing.Size(151, 19); + this.slimCheckBox.TabIndex = 6; + this.slimCheckBox.Text = "64x64 Alex/Slim Skin"; + this.slimCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.slimCheckBox, " The 1.8 style skin type with slim arms, overlays for each part, and sep" + "arate textures for right and left limbs. Resolution is also set to 64x64. " + " "); - this.slimCheckBox.UseSelectable = true; - // - // headCheckBox - // - this.headCheckBox.AutoSize = true; - this.headCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.headCheckBox.Location = new System.Drawing.Point(6, 50); - this.headCheckBox.Name = "headCheckBox"; - this.headCheckBox.Size = new System.Drawing.Size(136, 19); - this.headCheckBox.TabIndex = 5; - this.headCheckBox.Text = "Remove Head Box"; - this.headCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.headCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.slimCheckBox.UseSelectable = true; + // + // headCheckBox + // + this.headCheckBox.AutoSize = true; + this.headCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.headCheckBox.Location = new System.Drawing.Point(6, 50); + this.headCheckBox.Name = "headCheckBox"; + this.headCheckBox.Size = new System.Drawing.Size(136, 19); + this.headCheckBox.TabIndex = 5; + this.headCheckBox.Text = "Remove Head Box"; + this.headCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.headCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.headCheckBox.UseSelectable = true; - // - // leftLegCheckBox - // - this.leftLegCheckBox.AutoSize = true; - this.leftLegCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.leftLegCheckBox.Location = new System.Drawing.Point(6, 174); - this.leftLegCheckBox.Name = "leftLegCheckBox"; - this.leftLegCheckBox.Size = new System.Drawing.Size(153, 19); - this.leftLegCheckBox.TabIndex = 4; - this.leftLegCheckBox.Text = "Remove Left Leg Box"; - this.leftLegCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.leftLegCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.headCheckBox.UseSelectable = true; + // + // leftLegCheckBox + // + this.leftLegCheckBox.AutoSize = true; + this.leftLegCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.leftLegCheckBox.Location = new System.Drawing.Point(6, 174); + this.leftLegCheckBox.Name = "leftLegCheckBox"; + this.leftLegCheckBox.Size = new System.Drawing.Size(153, 19); + this.leftLegCheckBox.TabIndex = 4; + this.leftLegCheckBox.Text = "Remove Left Leg Box"; + this.leftLegCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.leftLegCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.leftLegCheckBox.UseSelectable = true; - // - // rightArmCheckBox - // - this.rightArmCheckBox.AutoSize = true; - this.rightArmCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.rightArmCheckBox.Location = new System.Drawing.Point(6, 143); - this.rightArmCheckBox.Name = "rightArmCheckBox"; - this.rightArmCheckBox.Size = new System.Drawing.Size(166, 19); - this.rightArmCheckBox.TabIndex = 3; - this.rightArmCheckBox.Text = "Remove Right Arm Box"; - this.rightArmCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.rightArmCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.leftLegCheckBox.UseSelectable = true; + // + // rightArmCheckBox + // + this.rightArmCheckBox.AutoSize = true; + this.rightArmCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.rightArmCheckBox.Location = new System.Drawing.Point(6, 143); + this.rightArmCheckBox.Name = "rightArmCheckBox"; + this.rightArmCheckBox.Size = new System.Drawing.Size(166, 19); + this.rightArmCheckBox.TabIndex = 3; + this.rightArmCheckBox.Text = "Remove Right Arm Box"; + this.rightArmCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.rightArmCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.rightArmCheckBox.UseSelectable = true; - // - // leftArmCheckBox - // - this.leftArmCheckBox.AutoSize = true; - this.leftArmCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.leftArmCheckBox.Location = new System.Drawing.Point(6, 112); - this.leftArmCheckBox.Name = "leftArmCheckBox"; - this.leftArmCheckBox.Size = new System.Drawing.Size(157, 19); - this.leftArmCheckBox.TabIndex = 2; - this.leftArmCheckBox.Text = "Remove Left Arm Box"; - this.leftArmCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.leftArmCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.rightArmCheckBox.UseSelectable = true; + // + // leftArmCheckBox + // + this.leftArmCheckBox.AutoSize = true; + this.leftArmCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.leftArmCheckBox.Location = new System.Drawing.Point(6, 112); + this.leftArmCheckBox.Name = "leftArmCheckBox"; + this.leftArmCheckBox.Size = new System.Drawing.Size(157, 19); + this.leftArmCheckBox.TabIndex = 2; + this.leftArmCheckBox.Text = "Remove Left Arm Box"; + this.leftArmCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.leftArmCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.leftArmCheckBox.UseSelectable = true; - // - // bodyCheckBox - // - this.bodyCheckBox.AutoSize = true; - this.bodyCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.bodyCheckBox.Location = new System.Drawing.Point(6, 81); - this.bodyCheckBox.Name = "bodyCheckBox"; - this.bodyCheckBox.Size = new System.Drawing.Size(135, 19); - this.bodyCheckBox.TabIndex = 1; - this.bodyCheckBox.Text = "Remove Body Box"; - this.bodyCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.bodyCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + this.leftArmCheckBox.UseSelectable = true; + // + // bodyCheckBox + // + this.bodyCheckBox.AutoSize = true; + this.bodyCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.bodyCheckBox.Location = new System.Drawing.Point(6, 81); + this.bodyCheckBox.Name = "bodyCheckBox"; + this.bodyCheckBox.Size = new System.Drawing.Size(135, 19); + this.bodyCheckBox.TabIndex = 1; + this.bodyCheckBox.Text = "Remove Body Box"; + this.bodyCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.bodyCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + "or this part. Armor will be disabled for this part, but can be rendered again wi" + "th the armor flags. "); - this.bodyCheckBox.UseSelectable = true; - // - // classicCheckBox - // - this.classicCheckBox.AutoSize = true; - this.classicCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.classicCheckBox.Location = new System.Drawing.Point(6, 19); - this.classicCheckBox.Name = "classicCheckBox"; - this.classicCheckBox.Size = new System.Drawing.Size(136, 19); - this.classicCheckBox.TabIndex = 0; - this.classicCheckBox.Text = "64x64 Classic Skin"; - this.classicCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.classicCheckBox, " The 1.8 style skin type with overlays for each part and separate textur" + + this.bodyCheckBox.UseSelectable = true; + // + // classicCheckBox + // + this.classicCheckBox.AutoSize = true; + this.classicCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.classicCheckBox.Location = new System.Drawing.Point(6, 19); + this.classicCheckBox.Name = "classicCheckBox"; + this.classicCheckBox.Size = new System.Drawing.Size(136, 19); + this.classicCheckBox.TabIndex = 0; + this.classicCheckBox.Text = "64x64 Classic Skin"; + this.classicCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.classicCheckBox, " The 1.8 style skin type with overlays for each part and separate textur" + "es for right and left limbs. Resolution is also set to 64x64. "); - this.classicCheckBox.UseSelectable = true; - // - // effectsGroup2 - // - this.effectsGroup2.Controls.Add(this.rightLeggingCheckBox); - this.effectsGroup2.Controls.Add(this.helmetCheckBox); - this.effectsGroup2.Controls.Add(this.leftLeggingCheckBox); - this.effectsGroup2.Controls.Add(this.rightArmorCheckBox); - this.effectsGroup2.Controls.Add(this.leftArmorCheckBox); - this.effectsGroup2.Controls.Add(this.chestplateCheckBox); - this.effectsGroup2.ForeColor = System.Drawing.SystemColors.Window; - this.effectsGroup2.Location = new System.Drawing.Point(437, 140); - this.effectsGroup2.Name = "effectsGroup2"; - this.effectsGroup2.Size = new System.Drawing.Size(184, 238); - this.effectsGroup2.TabIndex = 14; - this.effectsGroup2.TabStop = false; - this.effectsGroup2.Text = "Armor Flags"; - // - // rightLeggingCheckBox - // - this.rightLeggingCheckBox.AutoSize = true; - this.rightLeggingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.rightLeggingCheckBox.Location = new System.Drawing.Point(6, 174); - this.rightLeggingCheckBox.Name = "rightLeggingCheckBox"; - this.rightLeggingCheckBox.Size = new System.Drawing.Size(173, 19); - this.rightLeggingCheckBox.TabIndex = 7; - this.rightLeggingCheckBox.Text = "Render Right Leg Armor"; - this.rightLeggingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.rightLeggingCheckBox, " Forcefully enables the specified armor piece."); - this.rightLeggingCheckBox.UseSelectable = true; - // - // helmetCheckBox - // - this.helmetCheckBox.AutoSize = true; - this.helmetCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.helmetCheckBox.Location = new System.Drawing.Point(6, 19); - this.helmetCheckBox.Name = "helmetCheckBox"; - this.helmetCheckBox.Size = new System.Drawing.Size(147, 19); - this.helmetCheckBox.TabIndex = 5; - this.helmetCheckBox.Text = "Render Head Armor"; - this.helmetCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.helmetCheckBox, " Forcefully re-enables the specified armor piece."); - this.helmetCheckBox.UseSelectable = true; - // - // leftLeggingCheckBox - // - this.leftLeggingCheckBox.AutoSize = true; - this.leftLeggingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.leftLeggingCheckBox.Location = new System.Drawing.Point(6, 143); - this.leftLeggingCheckBox.Name = "leftLeggingCheckBox"; - this.leftLeggingCheckBox.Size = new System.Drawing.Size(164, 19); - this.leftLeggingCheckBox.TabIndex = 4; - this.leftLeggingCheckBox.Text = "Render Left Leg Armor"; - this.leftLeggingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.leftLeggingCheckBox, " Forcefully enables the specified armor piece."); - this.leftLeggingCheckBox.UseSelectable = true; - // - // rightArmorCheckBox - // - this.rightArmorCheckBox.AutoSize = true; - this.rightArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.rightArmorCheckBox.Location = new System.Drawing.Point(6, 112); - this.rightArmorCheckBox.Name = "rightArmorCheckBox"; - this.rightArmorCheckBox.Size = new System.Drawing.Size(177, 19); - this.rightArmorCheckBox.TabIndex = 3; - this.rightArmorCheckBox.Text = "Render Right Arm Armor"; - this.rightArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.rightArmorCheckBox, " Forcefully enables the specified armor piece."); - this.rightArmorCheckBox.UseSelectable = true; - // - // leftArmorCheckBox - // - this.leftArmorCheckBox.AutoSize = true; - this.leftArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.leftArmorCheckBox.Location = new System.Drawing.Point(6, 81); - this.leftArmorCheckBox.Name = "leftArmorCheckBox"; - this.leftArmorCheckBox.Size = new System.Drawing.Size(168, 19); - this.leftArmorCheckBox.TabIndex = 2; - this.leftArmorCheckBox.Text = "Render Left Arm Armor"; - this.leftArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.leftArmorCheckBox, " Forcefully enables the specified armor piece."); - this.leftArmorCheckBox.UseSelectable = true; - // - // chestplateCheckBox - // - this.chestplateCheckBox.AutoSize = true; - this.chestplateCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.chestplateCheckBox.Location = new System.Drawing.Point(6, 50); - this.chestplateCheckBox.Name = "chestplateCheckBox"; - this.chestplateCheckBox.Size = new System.Drawing.Size(146, 19); - this.chestplateCheckBox.TabIndex = 1; - this.chestplateCheckBox.Text = "Render Body Armor"; - this.chestplateCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.chestplateCheckBox, " Forcefully enables the specified armor piece for removed parent boxes. "); - this.chestplateCheckBox.UseSelectable = true; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.unknownCheckBox); - this.groupBox1.Controls.Add(this.crouchCheckBox); - this.groupBox1.Controls.Add(this.dinnerboneCheckBox); - this.groupBox1.Controls.Add(this.noArmorCheckBox); - this.groupBox1.Controls.Add(this.bobbingCheckBox); - this.groupBox1.Controls.Add(this.santaCheckBox); - this.groupBox1.Controls.Add(this.syncLegsCheckBox); - this.groupBox1.Controls.Add(this.staticArmsCheckBox); - this.groupBox1.Controls.Add(this.syncArmsCheckBox); - this.groupBox1.Controls.Add(this.statueCheckBox); - this.groupBox1.Controls.Add(this.zombieCheckBox); - this.groupBox1.Controls.Add(this.staticLegsCheckBox); - this.groupBox1.ForeColor = System.Drawing.SystemColors.Window; - this.groupBox1.Location = new System.Drawing.Point(23, 384); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(598, 137); - this.groupBox1.TabIndex = 15; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Special Animations"; - // - // unknownCheckBox - // - this.unknownCheckBox.AutoSize = true; - this.unknownCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.unknownCheckBox.Location = new System.Drawing.Point(126, 81); - this.unknownCheckBox.Name = "unknownCheckBox"; - this.unknownCheckBox.Size = new System.Drawing.Size(84, 19); - this.unknownCheckBox.TabIndex = 13; - this.unknownCheckBox.Text = "Unknown"; - this.unknownCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.unknownCheckBox, " If you figure out what this is. Please reach out to MNL#8935 on Discord. (: " + + this.classicCheckBox.UseSelectable = true; + // + // rightArmOCheckBox + // + this.rightArmOCheckBox.AutoSize = true; + this.rightArmOCheckBox.BackColor = System.Drawing.Color.Transparent; + this.rightArmOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.rightArmOCheckBox.Location = new System.Drawing.Point(180, 143); + this.rightArmOCheckBox.Name = "rightArmOCheckBox"; + this.rightArmOCheckBox.Size = new System.Drawing.Size(203, 19); + this.rightArmOCheckBox.TabIndex = 10; + this.rightArmOCheckBox.Text = "Remove Right Arm Layer Box"; + this.rightArmOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.rightArmOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" + + "or this part. Armor will be disabled for this part, but can be rendered again wi" + + "th the armor flags. "); + this.rightArmOCheckBox.UseSelectable = true; + // + // effectsGroup2 + // + this.effectsGroup2.Controls.Add(this.rightLeggingCheckBox); + this.effectsGroup2.Controls.Add(this.helmetCheckBox); + this.effectsGroup2.Controls.Add(this.leftLeggingCheckBox); + this.effectsGroup2.Controls.Add(this.rightArmorCheckBox); + this.effectsGroup2.Controls.Add(this.leftArmorCheckBox); + this.effectsGroup2.Controls.Add(this.chestplateCheckBox); + this.effectsGroup2.ForeColor = System.Drawing.SystemColors.Window; + this.effectsGroup2.Location = new System.Drawing.Point(421, 183); + this.effectsGroup2.Name = "effectsGroup2"; + this.effectsGroup2.Size = new System.Drawing.Size(188, 203); + this.effectsGroup2.TabIndex = 14; + this.effectsGroup2.TabStop = false; + this.effectsGroup2.Text = "Armor Flags"; + // + // rightLeggingCheckBox + // + this.rightLeggingCheckBox.AutoSize = true; + this.rightLeggingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.rightLeggingCheckBox.Location = new System.Drawing.Point(6, 174); + this.rightLeggingCheckBox.Name = "rightLeggingCheckBox"; + this.rightLeggingCheckBox.Size = new System.Drawing.Size(173, 19); + this.rightLeggingCheckBox.TabIndex = 7; + this.rightLeggingCheckBox.Text = "Render Right Leg Armor"; + this.rightLeggingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.rightLeggingCheckBox, " Forcefully enables the specified armor piece."); + this.rightLeggingCheckBox.UseSelectable = true; + // + // helmetCheckBox + // + this.helmetCheckBox.AutoSize = true; + this.helmetCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.helmetCheckBox.Location = new System.Drawing.Point(6, 19); + this.helmetCheckBox.Name = "helmetCheckBox"; + this.helmetCheckBox.Size = new System.Drawing.Size(147, 19); + this.helmetCheckBox.TabIndex = 5; + this.helmetCheckBox.Text = "Render Head Armor"; + this.helmetCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.helmetCheckBox, " Forcefully enables the specified armor piece."); + this.helmetCheckBox.UseSelectable = true; + // + // leftLeggingCheckBox + // + this.leftLeggingCheckBox.AutoSize = true; + this.leftLeggingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.leftLeggingCheckBox.Location = new System.Drawing.Point(6, 143); + this.leftLeggingCheckBox.Name = "leftLeggingCheckBox"; + this.leftLeggingCheckBox.Size = new System.Drawing.Size(164, 19); + this.leftLeggingCheckBox.TabIndex = 4; + this.leftLeggingCheckBox.Text = "Render Left Leg Armor"; + this.leftLeggingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.leftLeggingCheckBox, " Forcefully enables the specified armor piece."); + this.leftLeggingCheckBox.UseSelectable = true; + // + // rightArmorCheckBox + // + this.rightArmorCheckBox.AutoSize = true; + this.rightArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.rightArmorCheckBox.Location = new System.Drawing.Point(6, 112); + this.rightArmorCheckBox.Name = "rightArmorCheckBox"; + this.rightArmorCheckBox.Size = new System.Drawing.Size(177, 19); + this.rightArmorCheckBox.TabIndex = 3; + this.rightArmorCheckBox.Text = "Render Right Arm Armor"; + this.rightArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.rightArmorCheckBox, " Forcefully enables the specified armor piece."); + this.rightArmorCheckBox.UseSelectable = true; + // + // leftArmorCheckBox + // + this.leftArmorCheckBox.AutoSize = true; + this.leftArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.leftArmorCheckBox.Location = new System.Drawing.Point(6, 81); + this.leftArmorCheckBox.Name = "leftArmorCheckBox"; + this.leftArmorCheckBox.Size = new System.Drawing.Size(168, 19); + this.leftArmorCheckBox.TabIndex = 2; + this.leftArmorCheckBox.Text = "Render Left Arm Armor"; + this.leftArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.leftArmorCheckBox, " Forcefully enables the specified armor piece."); + this.leftArmorCheckBox.UseSelectable = true; + // + // chestplateCheckBox + // + this.chestplateCheckBox.AutoSize = true; + this.chestplateCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.chestplateCheckBox.Location = new System.Drawing.Point(6, 50); + this.chestplateCheckBox.Name = "chestplateCheckBox"; + this.chestplateCheckBox.Size = new System.Drawing.Size(146, 19); + this.chestplateCheckBox.TabIndex = 1; + this.chestplateCheckBox.Text = "Render Body Armor"; + this.chestplateCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.chestplateCheckBox, " Forcefully enables the specified armor piece."); + this.chestplateCheckBox.UseSelectable = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.unknownCheckBox); + this.groupBox1.Controls.Add(this.crouchCheckBox); + this.groupBox1.Controls.Add(this.dinnerboneCheckBox); + this.groupBox1.Controls.Add(this.noArmorCheckBox); + this.groupBox1.Controls.Add(this.bobbingCheckBox); + this.groupBox1.Controls.Add(this.santaCheckBox); + this.groupBox1.Controls.Add(this.syncLegsCheckBox); + this.groupBox1.Controls.Add(this.staticArmsCheckBox); + this.groupBox1.Controls.Add(this.syncArmsCheckBox); + this.groupBox1.Controls.Add(this.statueCheckBox); + this.groupBox1.Controls.Add(this.zombieCheckBox); + this.groupBox1.Controls.Add(this.staticLegsCheckBox); + this.groupBox1.ForeColor = System.Drawing.SystemColors.Window; + this.groupBox1.Location = new System.Drawing.Point(22, 388); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(587, 115); + this.groupBox1.TabIndex = 15; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Special Animations"; + // + // unknownCheckBox + // + this.unknownCheckBox.AutoSize = true; + this.unknownCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.unknownCheckBox.Location = new System.Drawing.Point(126, 81); + this.unknownCheckBox.Name = "unknownCheckBox"; + this.unknownCheckBox.Size = new System.Drawing.Size(84, 19); + this.unknownCheckBox.TabIndex = 13; + this.unknownCheckBox.Text = "Unknown"; + this.unknownCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.unknownCheckBox, " If you figure out what this is. Please reach out to MNL#8935 on Discord. (: " + ""); - this.unknownCheckBox.UseSelectable = true; - // - // crouchCheckBox - // - this.crouchCheckBox.AutoSize = true; - this.crouchCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.crouchCheckBox.Location = new System.Drawing.Point(126, 50); - this.crouchCheckBox.Name = "crouchCheckBox"; - this.crouchCheckBox.Size = new System.Drawing.Size(137, 19); - this.crouchCheckBox.TabIndex = 12; - this.crouchCheckBox.Text = "Backwards Crouch"; - this.crouchCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.crouchCheckBox, " The crouch animation is reversed so that the arms and body lean back. Usefu" + + this.unknownCheckBox.UseSelectable = true; + // + // crouchCheckBox + // + this.crouchCheckBox.AutoSize = true; + this.crouchCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.crouchCheckBox.Location = new System.Drawing.Point(126, 50); + this.crouchCheckBox.Name = "crouchCheckBox"; + this.crouchCheckBox.Size = new System.Drawing.Size(137, 19); + this.crouchCheckBox.TabIndex = 12; + this.crouchCheckBox.Text = "Backwards Crouch"; + this.crouchCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.crouchCheckBox, " The crouch animation is reversed so that the arms and body lean back. Usefu" + "l for small skins. "); - this.crouchCheckBox.UseSelectable = true; - // - // dinnerboneCheckBox - // - this.dinnerboneCheckBox.AutoSize = true; - this.dinnerboneCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.dinnerboneCheckBox.Location = new System.Drawing.Point(126, 19); - this.dinnerboneCheckBox.Name = "dinnerboneCheckBox"; - this.dinnerboneCheckBox.Size = new System.Drawing.Size(97, 19); - this.dinnerboneCheckBox.TabIndex = 11; - this.dinnerboneCheckBox.Text = "Dinnerbone"; - this.dinnerboneCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.dinnerboneCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.dinnerboneCheckBox, " Flips the skin upside down like Dinnerbone\'s skin, a Minecraft developer. "); - this.dinnerboneCheckBox.UseSelectable = true; - // - // noArmorCheckBox - // - this.noArmorCheckBox.AutoSize = true; - this.noArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.noArmorCheckBox.Location = new System.Drawing.Point(420, 81); - this.noArmorCheckBox.Name = "noArmorCheckBox"; - this.noArmorCheckBox.Size = new System.Drawing.Size(131, 19); - this.noArmorCheckBox.TabIndex = 10; - this.noArmorCheckBox.Text = "Disable All Armor"; - this.noArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.noArmorCheckBox, " Disables all armor desptie the armor flags. "); - this.noArmorCheckBox.UseSelectable = true; - // - // bobbingCheckBox - // - this.bobbingCheckBox.AutoSize = true; - this.bobbingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.bobbingCheckBox.Location = new System.Drawing.Point(272, 50); - this.bobbingCheckBox.Name = "bobbingCheckBox"; - this.bobbingCheckBox.Size = new System.Drawing.Size(124, 19); - this.bobbingCheckBox.TabIndex = 9; - this.bobbingCheckBox.Text = "Disable Bobbing"; - this.bobbingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.bobbingCheckBox, " Disables the bobbing effect in first person."); - this.bobbingCheckBox.UseSelectable = true; - // - // santaCheckBox - // - this.santaCheckBox.AutoSize = true; - this.santaCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.santaCheckBox.Location = new System.Drawing.Point(420, 50); - this.santaCheckBox.Name = "santaCheckBox"; - this.santaCheckBox.Size = new System.Drawing.Size(86, 19); - this.santaCheckBox.TabIndex = 8; - this.santaCheckBox.Text = "Bad Santa"; - this.santaCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.santaCheckBox, " The skin sits down after about 10 seconds of no controller input. Made for" + + this.crouchCheckBox.UseSelectable = true; + // + // dinnerboneCheckBox + // + this.dinnerboneCheckBox.AutoSize = true; + this.dinnerboneCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.dinnerboneCheckBox.Location = new System.Drawing.Point(126, 19); + this.dinnerboneCheckBox.Name = "dinnerboneCheckBox"; + this.dinnerboneCheckBox.Size = new System.Drawing.Size(97, 19); + this.dinnerboneCheckBox.TabIndex = 11; + this.dinnerboneCheckBox.Text = "Dinnerbone"; + this.dinnerboneCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.dinnerboneCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.dinnerboneCheckBox, " Flips the skin upside down like Dinnerbone\'s skin, a Minecraft developer. "); + this.dinnerboneCheckBox.UseSelectable = true; + // + // noArmorCheckBox + // + this.noArmorCheckBox.AutoSize = true; + this.noArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.noArmorCheckBox.Location = new System.Drawing.Point(420, 81); + this.noArmorCheckBox.Name = "noArmorCheckBox"; + this.noArmorCheckBox.Size = new System.Drawing.Size(131, 19); + this.noArmorCheckBox.TabIndex = 10; + this.noArmorCheckBox.Text = "Disable All Armor"; + this.noArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.noArmorCheckBox, " Disables all armor desptie the armor flags. "); + this.noArmorCheckBox.UseSelectable = true; + // + // bobbingCheckBox + // + this.bobbingCheckBox.AutoSize = true; + this.bobbingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.bobbingCheckBox.Location = new System.Drawing.Point(272, 50); + this.bobbingCheckBox.Name = "bobbingCheckBox"; + this.bobbingCheckBox.Size = new System.Drawing.Size(124, 19); + this.bobbingCheckBox.TabIndex = 9; + this.bobbingCheckBox.Text = "Disable Bobbing"; + this.bobbingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.bobbingCheckBox, " Disables the bobbing effect in first person."); + this.bobbingCheckBox.UseSelectable = true; + // + // santaCheckBox + // + this.santaCheckBox.AutoSize = true; + this.santaCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.santaCheckBox.Location = new System.Drawing.Point(420, 50); + this.santaCheckBox.Name = "santaCheckBox"; + this.santaCheckBox.Size = new System.Drawing.Size(86, 19); + this.santaCheckBox.TabIndex = 8; + this.santaCheckBox.Text = "Bad Santa"; + this.santaCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.santaCheckBox, " The skin sits down after about 10 seconds of no controller input. Made for" + " Bad Santa in the \"Festive\" skin pack. "); - this.santaCheckBox.UseSelectable = true; - // - // syncLegsCheckBox - // - this.syncLegsCheckBox.AutoSize = true; - this.syncLegsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.syncLegsCheckBox.Location = new System.Drawing.Point(272, 19); - this.syncLegsCheckBox.Name = "syncLegsCheckBox"; - this.syncLegsCheckBox.Size = new System.Drawing.Size(136, 19); - this.syncLegsCheckBox.TabIndex = 7; - this.syncLegsCheckBox.Text = "Synchronous Legs"; - this.syncLegsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.syncLegsCheckBox, " These parts will move at the same time and angle as each other. "); - this.syncLegsCheckBox.UseSelectable = true; - // - // staticArmsCheckBox - // - this.staticArmsCheckBox.AutoSize = true; - this.staticArmsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.staticArmsCheckBox.Location = new System.Drawing.Point(6, 19); - this.staticArmsCheckBox.Name = "staticArmsCheckBox"; - this.staticArmsCheckBox.Size = new System.Drawing.Size(94, 19); - this.staticArmsCheckBox.TabIndex = 5; - this.staticArmsCheckBox.Text = "Static Arms"; - this.staticArmsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.staticArmsCheckBox, " These parts will not move in most animations. "); - this.staticArmsCheckBox.UseSelectable = true; - // - // syncArmsCheckBox - // - this.syncArmsCheckBox.AutoSize = true; - this.syncArmsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.syncArmsCheckBox.Location = new System.Drawing.Point(420, 19); - this.syncArmsCheckBox.Name = "syncArmsCheckBox"; - this.syncArmsCheckBox.Size = new System.Drawing.Size(140, 19); - this.syncArmsCheckBox.TabIndex = 4; - this.syncArmsCheckBox.Text = "Synchronous Arms"; - this.syncArmsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.syncArmsCheckBox, " These parts will move at the same time and angle as each other. "); - this.syncArmsCheckBox.UseSelectable = true; - // - // statueCheckBox - // - this.statueCheckBox.AutoSize = true; - this.statueCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.statueCheckBox.Location = new System.Drawing.Point(272, 81); - this.statueCheckBox.Name = "statueCheckBox"; - this.statueCheckBox.Size = new System.Drawing.Size(126, 19); - this.statueCheckBox.TabIndex = 3; - this.statueCheckBox.Text = "Statue of Liberty"; - this.statueCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.statueCheckBox, " The right arm is lifted likt the Statue of Liberty. Made for Angel of Libe" + + this.santaCheckBox.UseSelectable = true; + // + // syncLegsCheckBox + // + this.syncLegsCheckBox.AutoSize = true; + this.syncLegsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.syncLegsCheckBox.Location = new System.Drawing.Point(272, 19); + this.syncLegsCheckBox.Name = "syncLegsCheckBox"; + this.syncLegsCheckBox.Size = new System.Drawing.Size(136, 19); + this.syncLegsCheckBox.TabIndex = 7; + this.syncLegsCheckBox.Text = "Synchronous Legs"; + this.syncLegsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.syncLegsCheckBox, " These parts will move at the same time and angle as each other. "); + this.syncLegsCheckBox.UseSelectable = true; + // + // staticArmsCheckBox + // + this.staticArmsCheckBox.AutoSize = true; + this.staticArmsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.staticArmsCheckBox.Location = new System.Drawing.Point(6, 19); + this.staticArmsCheckBox.Name = "staticArmsCheckBox"; + this.staticArmsCheckBox.Size = new System.Drawing.Size(94, 19); + this.staticArmsCheckBox.TabIndex = 5; + this.staticArmsCheckBox.Text = "Static Arms"; + this.staticArmsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.staticArmsCheckBox, " These parts will not move in most animations. "); + this.staticArmsCheckBox.UseSelectable = true; + // + // syncArmsCheckBox + // + this.syncArmsCheckBox.AutoSize = true; + this.syncArmsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.syncArmsCheckBox.Location = new System.Drawing.Point(420, 19); + this.syncArmsCheckBox.Name = "syncArmsCheckBox"; + this.syncArmsCheckBox.Size = new System.Drawing.Size(140, 19); + this.syncArmsCheckBox.TabIndex = 4; + this.syncArmsCheckBox.Text = "Synchronous Arms"; + this.syncArmsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.syncArmsCheckBox, " These parts will move at the same time and angle as each other. "); + this.syncArmsCheckBox.UseSelectable = true; + // + // statueCheckBox + // + this.statueCheckBox.AutoSize = true; + this.statueCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.statueCheckBox.Location = new System.Drawing.Point(272, 81); + this.statueCheckBox.Name = "statueCheckBox"; + this.statueCheckBox.Size = new System.Drawing.Size(126, 19); + this.statueCheckBox.TabIndex = 3; + this.statueCheckBox.Text = "Statue of Liberty"; + this.statueCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.statueCheckBox, " The right arm is lifted likt the Statue of Liberty. Made for Angel of Libe" + "rty in the \"Doctor Who Volume I\" skin pack. "); - this.statueCheckBox.UseSelectable = true; - // - // zombieCheckBox - // - this.zombieCheckBox.AutoSize = true; - this.zombieCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.zombieCheckBox.Location = new System.Drawing.Point(6, 81); - this.zombieCheckBox.Name = "zombieCheckBox"; - this.zombieCheckBox.Size = new System.Drawing.Size(107, 19); - this.zombieCheckBox.TabIndex = 2; - this.zombieCheckBox.Text = "Zombie Arms"; - this.zombieCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.zombieCheckBox, " Both arms will stick up like a Zombie. "); - this.zombieCheckBox.UseSelectable = true; - // - // staticLegsCheckBox - // - this.staticLegsCheckBox.AutoSize = true; - this.staticLegsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; - this.staticLegsCheckBox.Location = new System.Drawing.Point(6, 50); - this.staticLegsCheckBox.Name = "staticLegsCheckBox"; - this.staticLegsCheckBox.Size = new System.Drawing.Size(90, 19); - this.staticLegsCheckBox.TabIndex = 1; - this.staticLegsCheckBox.Text = "Static Legs"; - this.staticLegsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.toolTip.SetToolTip(this.staticLegsCheckBox, " These parts will not move in most animations. "); - this.staticLegsCheckBox.UseSelectable = true; - // - // copyButton - // - this.copyButton.Location = new System.Drawing.Point(262, 117); - this.copyButton.Name = "copyButton"; - this.copyButton.Size = new System.Drawing.Size(126, 23); - this.copyButton.TabIndex = 22; - this.copyButton.Text = "Copy"; - this.copyButton.Theme = MetroFramework.MetroThemeStyle.Dark; - this.copyButton.UseSelectable = true; - this.copyButton.Click += new System.EventHandler(this.copyButton_Click); - // - // importButton - // - this.importButton.Location = new System.Drawing.Point(394, 117); - this.importButton.Name = "importButton"; - this.importButton.Size = new System.Drawing.Size(126, 23); - this.importButton.TabIndex = 23; - this.importButton.Text = "Import ANIM"; - this.importButton.Theme = MetroFramework.MetroThemeStyle.Dark; - this.importButton.UseSelectable = true; - this.importButton.Click += new System.EventHandler(this.importButton_Click); - // - // exportButton - // - this.exportButton.Location = new System.Drawing.Point(120, 117); - this.exportButton.Name = "exportButton"; - this.exportButton.Size = new System.Drawing.Size(136, 23); - this.exportButton.TabIndex = 24; - this.exportButton.Text = "Export Template Texture"; - this.exportButton.Theme = MetroFramework.MetroThemeStyle.Dark; - this.exportButton.UseSelectable = true; - this.exportButton.Click += new System.EventHandler(this.exportButton_Click); - // - // animValue - // - this.animValue.AutoSize = true; - this.animValue.FontSize = MetroFramework.MetroLabelSize.Tall; - this.animValue.Location = new System.Drawing.Point(275, 58); - this.animValue.Name = "animValue"; - this.animValue.Size = new System.Drawing.Size(101, 25); - this.animValue.TabIndex = 25; - this.animValue.Text = "0x00000000"; - this.animValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.animValue.Theme = MetroFramework.MetroThemeStyle.Dark; - // - // uncheckButton - // - this.uncheckButton.Location = new System.Drawing.Point(206, 88); - this.uncheckButton.Name = "uncheckButton"; - this.uncheckButton.Size = new System.Drawing.Size(126, 23); - this.uncheckButton.TabIndex = 26; - this.uncheckButton.Text = "Uncheck All"; - this.uncheckButton.Theme = MetroFramework.MetroThemeStyle.Dark; - this.uncheckButton.UseSelectable = true; - this.uncheckButton.Click += new System.EventHandler(this.uncheckButton_Click); - // - // checkButton - // - this.checkButton.Location = new System.Drawing.Point(338, 88); - this.checkButton.Name = "checkButton"; - this.checkButton.Size = new System.Drawing.Size(126, 23); - this.checkButton.TabIndex = 27; - this.checkButton.Text = "Check All"; - this.checkButton.Theme = MetroFramework.MetroThemeStyle.Dark; - this.checkButton.UseSelectable = true; - this.checkButton.Click += new System.EventHandler(this.checkButton_Click); - // - // toolTip - // - this.toolTip.StripAmpersands = true; - this.toolTip.Style = MetroFramework.MetroColorStyle.Blue; - this.toolTip.StyleManager = null; - this.toolTip.Theme = MetroFramework.MetroThemeStyle.Dark; - // - // ANIMEditor - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(640, 573); - this.Controls.Add(this.checkButton); - this.Controls.Add(this.uncheckButton); - this.Controls.Add(this.animValue); - this.Controls.Add(this.exportButton); - this.Controls.Add(this.importButton); - this.Controls.Add(this.copyButton); - this.Controls.Add(this.groupBox1); - this.Controls.Add(this.effectsGroup2); - this.Controls.Add(this.effectsGroup); - this.Controls.Add(this.closeButton); - this.MinimumSize = new System.Drawing.Size(640, 573); - this.Name = "ANIMEditor"; - this.Style = MetroFramework.MetroColorStyle.Silver; - this.Text = "ANIM Editor"; - this.Theme = MetroFramework.MetroThemeStyle.Dark; - this.effectsGroup.ResumeLayout(false); - this.effectsGroup.PerformLayout(); - this.effectsGroup2.ResumeLayout(false); - this.effectsGroup2.PerformLayout(); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.statueCheckBox.UseSelectable = true; + // + // zombieCheckBox + // + this.zombieCheckBox.AutoSize = true; + this.zombieCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.zombieCheckBox.Location = new System.Drawing.Point(6, 81); + this.zombieCheckBox.Name = "zombieCheckBox"; + this.zombieCheckBox.Size = new System.Drawing.Size(107, 19); + this.zombieCheckBox.TabIndex = 2; + this.zombieCheckBox.Text = "Zombie Arms"; + this.zombieCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.zombieCheckBox, " Both arms will stick up like a Zombie. "); + this.zombieCheckBox.UseSelectable = true; + // + // staticLegsCheckBox + // + this.staticLegsCheckBox.AutoSize = true; + this.staticLegsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium; + this.staticLegsCheckBox.Location = new System.Drawing.Point(6, 50); + this.staticLegsCheckBox.Name = "staticLegsCheckBox"; + this.staticLegsCheckBox.Size = new System.Drawing.Size(90, 19); + this.staticLegsCheckBox.TabIndex = 1; + this.staticLegsCheckBox.Text = "Static Legs"; + this.staticLegsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.toolTip.SetToolTip(this.staticLegsCheckBox, " These parts will not move in most animations. "); + this.staticLegsCheckBox.UseSelectable = true; + // + // copyButton + // + this.copyButton.Location = new System.Drawing.Point(425, 119); + this.copyButton.Name = "copyButton"; + this.copyButton.Size = new System.Drawing.Size(173, 23); + this.copyButton.TabIndex = 22; + this.copyButton.Text = "Copy ANIM Value"; + this.copyButton.Theme = MetroFramework.MetroThemeStyle.Dark; + this.copyButton.UseSelectable = true; + this.copyButton.Click += new System.EventHandler(this.copyButton_Click); + // + // importButton + // + this.importButton.Location = new System.Drawing.Point(32, 119); + this.importButton.Name = "importButton"; + this.importButton.Size = new System.Drawing.Size(186, 23); + this.importButton.TabIndex = 23; + this.importButton.Text = "Import ANIM"; + this.importButton.Theme = MetroFramework.MetroThemeStyle.Dark; + this.importButton.UseSelectable = true; + this.importButton.Click += new System.EventHandler(this.importButton_Click); + // + // exportButton + // + this.exportButton.Location = new System.Drawing.Point(229, 119); + this.exportButton.Name = "exportButton"; + this.exportButton.Size = new System.Drawing.Size(186, 23); + this.exportButton.TabIndex = 24; + this.exportButton.Text = "Export Template Texture"; + this.exportButton.Theme = MetroFramework.MetroThemeStyle.Dark; + this.exportButton.UseSelectable = true; + this.exportButton.Click += new System.EventHandler(this.exportButton_Click); + // + // animValue + // + this.animValue.AutoSize = true; + this.animValue.FontSize = MetroFramework.MetroLabelSize.Tall; + this.animValue.FontWeight = MetroFramework.MetroLabelWeight.Regular; + this.animValue.Location = new System.Drawing.Point(260, 60); + this.animValue.Name = "animValue"; + this.animValue.Size = new System.Drawing.Size(110, 25); + this.animValue.TabIndex = 25; + this.animValue.Text = "0x00000000"; + this.animValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.animValue.Theme = MetroFramework.MetroThemeStyle.Dark; + // + // uncheckButton + // + this.uncheckButton.Location = new System.Drawing.Point(229, 90); + this.uncheckButton.Name = "uncheckButton"; + this.uncheckButton.Size = new System.Drawing.Size(186, 23); + this.uncheckButton.TabIndex = 26; + this.uncheckButton.Text = "Uncheck All"; + this.uncheckButton.Theme = MetroFramework.MetroThemeStyle.Dark; + this.uncheckButton.UseSelectable = true; + this.uncheckButton.Click += new System.EventHandler(this.uncheckButton_Click); + // + // checkButton + // + this.checkButton.Location = new System.Drawing.Point(32, 90); + this.checkButton.Name = "checkButton"; + this.checkButton.Size = new System.Drawing.Size(186, 23); + this.checkButton.TabIndex = 27; + this.checkButton.Text = "Check All"; + this.checkButton.Theme = MetroFramework.MetroThemeStyle.Dark; + this.checkButton.UseSelectable = true; + this.checkButton.Click += new System.EventHandler(this.checkButton_Click); + // + // toolTip + // + this.toolTip.StripAmpersands = true; + this.toolTip.Style = MetroFramework.MetroColorStyle.Blue; + this.toolTip.StyleManager = null; + this.toolTip.Theme = MetroFramework.MetroThemeStyle.Dark; + // + // resetButton + // + this.resetButton.Location = new System.Drawing.Point(425, 90); + this.resetButton.Name = "resetButton"; + this.resetButton.Size = new System.Drawing.Size(173, 23); + this.resetButton.TabIndex = 28; + this.resetButton.Text = "Restore ANIM"; + this.resetButton.Theme = MetroFramework.MetroThemeStyle.Dark; + this.resetButton.UseSelectable = true; + this.resetButton.Click += new System.EventHandler(this.resetButton_Click); + // + // templateButton + // + this.templateButton.Location = new System.Drawing.Point(425, 154); + this.templateButton.Name = "templateButton"; + this.templateButton.Size = new System.Drawing.Size(173, 23); + this.templateButton.TabIndex = 29; + this.templateButton.Text = "Skin Presets"; + this.templateButton.Theme = MetroFramework.MetroThemeStyle.Dark; + this.templateButton.UseSelectable = true; + this.templateButton.Click += new System.EventHandler(this.templateButton_Click); + // + // ANIMEditor + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(630, 554); + this.Controls.Add(this.templateButton); + this.Controls.Add(this.effectsGroup); + this.Controls.Add(this.resetButton); + this.Controls.Add(this.checkButton); + this.Controls.Add(this.uncheckButton); + this.Controls.Add(this.animValue); + this.Controls.Add(this.exportButton); + this.Controls.Add(this.importButton); + this.Controls.Add(this.copyButton); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.effectsGroup2); + this.Controls.Add(this.closeButton); + this.MinimumSize = new System.Drawing.Size(630, 554); + this.Name = "ANIMEditor"; + this.Style = MetroFramework.MetroColorStyle.Silver; + this.Text = "ANIM Editor"; + this.Theme = MetroFramework.MetroThemeStyle.Dark; + this.effectsGroup.ResumeLayout(false); + this.effectsGroup.PerformLayout(); + this.effectsGroup2.ResumeLayout(false); + this.effectsGroup2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -746,5 +774,7 @@ private MetroFramework.Controls.MetroButton uncheckButton; private MetroFramework.Controls.MetroButton checkButton; private MetroFramework.Components.MetroToolTip toolTip; + private MetroFramework.Controls.MetroButton resetButton; + private MetroFramework.Controls.MetroButton templateButton; } } \ No newline at end of file diff --git a/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs b/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs index 93113401..816c54a0 100644 --- a/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs +++ b/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs @@ -15,9 +15,24 @@ namespace PckStudio.Forms.Utilities.Skins public partial class ANIMEditor : MetroFramework.Forms.MetroForm { public bool saved = false; + string originalANIM = ""; public string outANIM => animValue.Text; SkinANIM anim = new SkinANIM(); + string[] animPresets = + { + "0", // Steve (64x32) + "40000", // Steve (64x64) + "80000", // Alex (64x64) + "2", // Zombie Skins + "60", // Cetacean Skins + "44", // Ski Skins + "6", // Ghost Skins + "20", // Medusa (Greek Myth.) + "4", // Librarian (Halo) + "5", // Grim Reaper (Halloween) + }; + void processCheckBoxes(bool set_all = false, bool value = false) { bobbingCheckBox.Checked = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.HEAD_BOBBING_DISABLED); @@ -69,6 +84,7 @@ namespace PckStudio.Forms.Utilities.Skins DialogResult = DialogResult.Abort; Close(); } + originalANIM = ANIM; anim = new SkinANIM(ANIM); bobbingCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.HEAD_BOBBING_DISABLED); }; @@ -124,6 +140,7 @@ namespace PckStudio.Forms.Utilities.Skins private void closeButton_Click(object sender, EventArgs e) { DialogResult = DialogResult.OK; + saved = true; Close(); } @@ -228,5 +245,64 @@ namespace PckStudio.Forms.Utilities.Skins skin.Save(saveFileDialog.FileName); } + + private void resetButton_Click(object sender, EventArgs e) + { + anim = new SkinANIM(originalANIM); + processCheckBoxes(); + anim = new SkinANIM(originalANIM); // Runs a second time to ensure the armor flags are set properly + processCheckBoxes(); + } + + static ValueTuple[] templates = + { + new ValueTuple("Steve (64x32)", "0"), + new ValueTuple("Steve (64x64)", "40000"), + new ValueTuple("Alex (64x64)", "80000"), + new ValueTuple("Zombie Skins", "2"), + new ValueTuple("Cetacean Skins", "60"), + new ValueTuple("Ski Skins", "44"), + new ValueTuple("Ghost Skins", "6"), + new ValueTuple("Medusa (Greek Myth.)", "20"), + new ValueTuple("Librarian (Halo)", "4"), + new ValueTuple("Grim Reaper (Halloween)", "5"), + }; + + private void templateButton_Click(object sender, EventArgs e) + { + // Recycling the AddCategory popup to handle the ANIM templates (: + // diag.Category will be the ANIM codes + var diag = new Forms.Additional_Popups.Audio.addCategory(templates.Select(template => template.Item1).ToArray()); + diag.label2.Text = "Presets"; + diag.button1.Text = "Load"; + + if (diag.ShowDialog() != DialogResult.OK) return; + + var templateANIM = new SkinANIM("0x" + templates.ToList().Find(template => template.Item1 == diag.Category).Item2); + DialogResult prompt = MessageBox.Show(this, "Would you like to add this preset's effects to your current ANIM? Otherwise all of your effects will be cleared. Either choice can be undone by pressing \"Restore ANIM\".", "", MessageBoxButtons.YesNo); + if (prompt == DialogResult.No) anim = templateANIM; + else + { + foreach (eANIM_EFFECTS flag in (eANIM_EFFECTS[])Enum.GetValues(typeof(eANIM_EFFECTS))) + { + if (templateANIM.GetANIMFlag(flag)) anim.SetANIMFlag(flag, true); + } + if (diag.Category == templates[0].Item1) + { + anim.SetANIMFlag(eANIM_EFFECTS.RESOLUTION_64x64, false); + anim.SetANIMFlag(eANIM_EFFECTS.SLIM_MODEL, false); + } + else if (diag.Category == templates[1].Item1) + { + anim.SetANIMFlag(eANIM_EFFECTS.RESOLUTION_64x64, true); + anim.SetANIMFlag(eANIM_EFFECTS.SLIM_MODEL, false); + } + else if (diag.Category == templates[2].Item1) + { + anim.SetANIMFlag(eANIM_EFFECTS.SLIM_MODEL, true); + } + } + processCheckBoxes(); + } } } From 11279b8ab83e7bd7634d94f98413b7e4dad663d2 Mon Sep 17 00:00:00 2001 From: MattNL Date: Tue, 16 Aug 2022 05:42:25 -0400 Subject: [PATCH 03/18] Update ANIMEditor.cs --- PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs b/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs index 816c54a0..b942e14e 100644 --- a/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs +++ b/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs @@ -186,6 +186,8 @@ namespace PckStudio.Forms.Utilities.Skins } anim = new SkinANIM(new_value); processCheckBoxes(); + anim = new SkinANIM(new_value); // Runs a second time to ensure the armor flags are set properly + processCheckBoxes(); } private void uncheckButton_Click(object sender, EventArgs e) @@ -302,6 +304,10 @@ namespace PckStudio.Forms.Utilities.Skins anim.SetANIMFlag(eANIM_EFFECTS.SLIM_MODEL, true); } } + SkinANIM backup = anim; + processCheckBoxes(); + anim = backup; + // Runs a second time to ensure the armor flags are set properly processCheckBoxes(); } } From 0fa6e08cf4bb890115f00376eddffac063fda4ab Mon Sep 17 00:00:00 2001 From: MattNL Date: Tue, 16 Aug 2022 14:58:12 -0400 Subject: [PATCH 04/18] fixed checkbox enable bugs in ANIM editor --- .../Forms/Utilities/Skins/ANIMEditor.cs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs b/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs index b942e14e..67f3044a 100644 --- a/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs +++ b/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs @@ -35,6 +35,14 @@ namespace PckStudio.Forms.Utilities.Skins void processCheckBoxes(bool set_all = false, bool value = false) { + #region processes every single checkbox with the correct ANIM flags + helmetCheckBox.Enabled = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.HEAD_DISABLED); + chestplateCheckBox.Enabled = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.BODY_DISABLED); + leftArmorCheckBox.Enabled = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.LEFT_ARM_DISABLED); + rightArmorCheckBox.Enabled = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.RIGHT_ARM_DISABLED); + leftLeggingCheckBox.Enabled = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.LEFT_LEG_DISABLED); + rightLeggingCheckBox.Enabled = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.RIGHT_LEG_DISABLED); + bobbingCheckBox.Checked = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.HEAD_BOBBING_DISABLED); bodyCheckBox.Checked = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.BODY_DISABLED); bodyOCheckBox.Checked = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.BODY_OVERLAY_DISABLED); @@ -74,6 +82,7 @@ namespace PckStudio.Forms.Utilities.Skins syncLegsCheckBox.Checked = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.SYNCED_LEGS); unknownCheckBox.Checked = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.unk_BIT4); zombieCheckBox.Checked = set_all ? value : anim.GetANIMFlag(eANIM_EFFECTS.ZOMBIE_ARMS); + #endregion } public ANIMEditor(string ANIM) @@ -86,7 +95,8 @@ namespace PckStudio.Forms.Utilities.Skins } originalANIM = ANIM; anim = new SkinANIM(ANIM); - + + #region Event definitions, since the designer can't parse lambda experessions bobbingCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.HEAD_BOBBING_DISABLED); }; bodyCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.BODY_DISABLED); }; bodyOCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.BODY_OVERLAY_DISABLED); }; @@ -126,13 +136,7 @@ namespace PckStudio.Forms.Utilities.Skins syncLegsCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.SYNCED_LEGS); }; unknownCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.unk_BIT4); }; zombieCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.ZOMBIE_ARMS); }; - - helmetCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.FORCE_HEAD_ARMOR); }; - chestplateCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.FORCE_BODY_ARMOR); }; - rightArmorCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.FORCE_RIGHT_ARM_ARMOR); }; - leftArmorCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.FORCE_LEFT_ARM_ARMOR); }; - rightLeggingCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.FORCE_RIGHT_LEG_ARMOR); }; - leftLeggingCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, eANIM_EFFECTS.FORCE_LEFT_LEG_ARMOR); }; + #endregion processCheckBoxes(); } @@ -186,8 +190,6 @@ namespace PckStudio.Forms.Utilities.Skins } anim = new SkinANIM(new_value); processCheckBoxes(); - anim = new SkinANIM(new_value); // Runs a second time to ensure the armor flags are set properly - processCheckBoxes(); } private void uncheckButton_Click(object sender, EventArgs e) @@ -213,6 +215,7 @@ namespace PckStudio.Forms.Utilities.Skins Image skin = isSlim ? Properties.Resources.slim_template : Properties.Resources.classic_template; + #region Image processing code for generating the skin templates based on the input ANIM value Bitmap nb = new Bitmap(64, (!isSlim && !isClassic64) ? 32 : 64); using (Graphics g = Graphics.FromImage(nb)) { @@ -244,6 +247,7 @@ namespace PckStudio.Forms.Utilities.Skins nb.MakeTransparent(Color.Magenta); skin = nb; } + #endregion skin.Save(saveFileDialog.FileName); } @@ -252,8 +256,6 @@ namespace PckStudio.Forms.Utilities.Skins { anim = new SkinANIM(originalANIM); processCheckBoxes(); - anim = new SkinANIM(originalANIM); // Runs a second time to ensure the armor flags are set properly - processCheckBoxes(); } static ValueTuple[] templates = @@ -307,8 +309,6 @@ namespace PckStudio.Forms.Utilities.Skins SkinANIM backup = anim; processCheckBoxes(); anim = backup; - // Runs a second time to ensure the armor flags are set properly - processCheckBoxes(); } } } From ae8edfbfa5856974bd48828507e7969a73b711d1 Mon Sep 17 00:00:00 2001 From: MattNL Date: Tue, 16 Aug 2022 14:59:30 -0400 Subject: [PATCH 05/18] deleted unused preset list --- PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs b/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs index 67f3044a..b077519d 100644 --- a/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs +++ b/PCK-Studio/Forms/Utilities/Skins/ANIMEditor.cs @@ -19,20 +19,6 @@ namespace PckStudio.Forms.Utilities.Skins public string outANIM => animValue.Text; SkinANIM anim = new SkinANIM(); - string[] animPresets = - { - "0", // Steve (64x32) - "40000", // Steve (64x64) - "80000", // Alex (64x64) - "2", // Zombie Skins - "60", // Cetacean Skins - "44", // Ski Skins - "6", // Ghost Skins - "20", // Medusa (Greek Myth.) - "4", // Librarian (Halo) - "5", // Grim Reaper (Halloween) - }; - void processCheckBoxes(bool set_all = false, bool value = false) { #region processes every single checkbox with the correct ANIM flags From ad3126fb8a86682351d1163a977f7359a4632c14 Mon Sep 17 00:00:00 2001 From: MattNL Date: Tue, 16 Aug 2022 18:24:38 -0400 Subject: [PATCH 06/18] Split help tab in AudioEditor into smaller help messages --- .../Forms/Editor/AudioEditor.Designer.cs | 50 ++++++++++-- PCK-Studio/Forms/Editor/AudioEditor.cs | 31 +++++++ PCK-Studio/Forms/Editor/AudioEditor.resx | 80 +++++++++++++++---- 3 files changed, 138 insertions(+), 23 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs index 3d6f0775..2ac5a7f6 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs @@ -41,6 +41,7 @@ namespace PckStudio.Forms.Editor this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.creditsEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.treeView2 = new System.Windows.Forms.TreeView(); this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); @@ -48,7 +49,10 @@ namespace PckStudio.Forms.Editor this.removeEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.verifyFileLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.playOverworldInCreative = new MetroFramework.Controls.MetroCheckBox(); - this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.howToAddSongsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.whatIsEachCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStrip1.SuspendLayout(); this.menuStrip.SuspendLayout(); this.contextMenuStrip2.SuspendLayout(); @@ -140,12 +144,23 @@ namespace PckStudio.Forms.Editor resources.ApplyResources(this.creditsEditorToolStripMenuItem, "creditsEditorToolStripMenuItem"); this.creditsEditorToolStripMenuItem.Click += new System.EventHandler(this.creditsEditorToolStripMenuItem_Click); // + // deleteUnusedBINKAsToolStripMenuItem + // + this.deleteUnusedBINKAsToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Del; + this.deleteUnusedBINKAsToolStripMenuItem.Name = "deleteUnusedBINKAsToolStripMenuItem"; + resources.ApplyResources(this.deleteUnusedBINKAsToolStripMenuItem, "deleteUnusedBINKAsToolStripMenuItem"); + this.deleteUnusedBINKAsToolStripMenuItem.Click += new System.EventHandler(this.deleteUnusedBINKAsToolStripMenuItem_Click); + // // helpToolStripMenuItem // + this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.howToAddSongsToolStripMenuItem, + this.whatIsEachCategoryToolStripMenuItem, + this.howToEditCreditsToolStripMenuItem, + this.optimizeDataFolderToolStripMenuItem}); this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White; this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem"); - this.helpToolStripMenuItem.Click += new System.EventHandler(this.helpToolStripMenuItem_Click); // // treeView2 // @@ -198,12 +213,29 @@ namespace PckStudio.Forms.Editor this.playOverworldInCreative.UseCustomForeColor = true; this.playOverworldInCreative.UseSelectable = true; // - // deleteUnusedBINKAsToolStripMenuItem + // howToAddSongsToolStripMenuItem // - this.deleteUnusedBINKAsToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Del; - this.deleteUnusedBINKAsToolStripMenuItem.Name = "deleteUnusedBINKAsToolStripMenuItem"; - resources.ApplyResources(this.deleteUnusedBINKAsToolStripMenuItem, "deleteUnusedBINKAsToolStripMenuItem"); - this.deleteUnusedBINKAsToolStripMenuItem.Click += new System.EventHandler(this.deleteUnusedBINKAsToolStripMenuItem_Click); + this.howToAddSongsToolStripMenuItem.Name = "howToAddSongsToolStripMenuItem"; + resources.ApplyResources(this.howToAddSongsToolStripMenuItem, "howToAddSongsToolStripMenuItem"); + this.howToAddSongsToolStripMenuItem.Click += new System.EventHandler(this.howToAddSongsToolStripMenuItem_Click); + // + // whatIsEachCategoryToolStripMenuItem + // + this.whatIsEachCategoryToolStripMenuItem.Name = "whatIsEachCategoryToolStripMenuItem"; + resources.ApplyResources(this.whatIsEachCategoryToolStripMenuItem, "whatIsEachCategoryToolStripMenuItem"); + this.whatIsEachCategoryToolStripMenuItem.Click += new System.EventHandler(this.whatIsEachCategoryToolStripMenuItem_Click); + // + // howToEditCreditsToolStripMenuItem + // + this.howToEditCreditsToolStripMenuItem.Name = "howToEditCreditsToolStripMenuItem"; + resources.ApplyResources(this.howToEditCreditsToolStripMenuItem, "howToEditCreditsToolStripMenuItem"); + this.howToEditCreditsToolStripMenuItem.Click += new System.EventHandler(this.howToEditCreditsToolStripMenuItem_Click); + // + // optimizeDataFolderToolStripMenuItem + // + this.optimizeDataFolderToolStripMenuItem.Name = "optimizeDataFolderToolStripMenuItem"; + resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem"); + this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click); // // AudioEditor // @@ -247,5 +279,9 @@ namespace PckStudio.Forms.Editor private System.Windows.Forms.ToolStripMenuItem verifyFileLocationToolStripMenuItem; private MetroFramework.Controls.MetroCheckBox playOverworldInCreative; private System.Windows.Forms.ToolStripMenuItem deleteUnusedBINKAsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem howToAddSongsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem whatIsEachCategoryToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem howToEditCreditsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem optimizeDataFolderToolStripMenuItem; } } \ No newline at end of file diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index b7aaf66f..a3b5560d 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -464,5 +464,36 @@ namespace PckStudio.Forms.Editor MainForm parent = Owner.Owner as MainForm; // Gets the MainForm so we can access the Save Location DataDirectory = Path.Combine(Path.GetDirectoryName(parent.saveLocation), "Data"); } + + private void howToAddSongsToolStripMenuItem_Click(object sender, EventArgs e) + { + MessageBox.Show("Right click the right window and press \"Add Entry\" or drag and drop a valid WAV file into the editor's right window. You can also drop other BINKA files, either from the main game or using a tool like BinkMan. The editor will automatically put the song in the Data folder for you.", "How to add a song"); + } + + private void whatIsEachCategoryToolStripMenuItem_Click(object sender, EventArgs e) + { + MessageBox.Show("Categories are pretty self explanatory. The game controls when each category should play.\n" + + "\nGAMEPLAY - Plays in the specified dimensions.\n" + + "-Overworld: Plays in survival mode and in Creative if no songs are set\n" + + "-Nether: Nothing special to note.\n" + + "-End: Prioritizes the final track when the dragon is alive.\n" + + "-Creative: Does not play survival tracks unless they're included.\n" + + "-Menu: Plays on the title screen and only once when the pack is loading. Perfect for intro songs.\n" + + "\nMINI GAMES - Will only play if you change the map grf files to load your pack and set the ThemeID to 0 for Vanilla maps.\n" + + "-Battle: Plays in the Battle Mini Game.\n" + + "-Tumble: Plays in the Tumble Mini Game.\n" + + "-Glide: Plays in the Glide Mini Game.\n", + "What is each category?"); + } + + private void howToEditCreditsToolStripMenuItem_Click(object sender, EventArgs e) + { + MessageBox.Show("Click Tools -> Credits Editor. This will allow you to edit all the credits easily in the pack easily. Only supports English credits at the moment. ","How to edit credits?"); + } + + private void optimizeDataFolderToolStripMenuItem_Click(object sender, EventArgs e) + { + MessageBox.Show("Click Tools -> Delete Unused BINKA files. This will clean your folder of any unused songs.", "How to optimize the Data folder"); + } } } diff --git a/PCK-Studio/Forms/Editor/AudioEditor.resx b/PCK-Studio/Forms/Editor/AudioEditor.resx index b70bb513..f3b322cb 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.resx +++ b/PCK-Studio/Forms/Editor/AudioEditor.resx @@ -146,7 +146,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADk - MAAAAk1TRnQBSQFMAgEBCQEAAUgBAAFIAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA + MAAAAk1TRnQBSQFMAgEBCQEAAVABAAFQAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA AwABMAMAAQEBAAEgBgABMBIAAzgB/wM1Af8DNQH/AzMB/wMwAf8DLwH/Ay0B/wMtAf8DJAH/AzsB/wM4 Af8DNQH/Ay0B/wMnAf8DNgH/AzIB/8AAAzgB/wN/Af8DeQH/A3kB/wN5Af8DcQH/A3EB/wN5Af8DeQH/ A3EB/wNxAf8DcQH/A3kB/wN5Af8DfwH/AzIB/8AAAzIB/wN2Af8DsAH/A7AB/wOvAf8DrwH/A68B/wOo @@ -416,24 +416,36 @@ File - - 192, 22 - - - Credits Editor - - - 192, 22 - - - Delete Unused BINKAs - 46, 20 Tools + + 180, 22 + + + How to add songs + + + 195, 22 + + + What is each category? + + + 195, 22 + + + How to edit credits + + + 245, 22 + + + How to Optimize the Data folder + 44, 20 @@ -480,6 +492,18 @@ Save + + 192, 22 + + + Credits Editor + + + 192, 22 + + + Delete Unused BINKAs + Top, Bottom, Left, Right @@ -629,6 +653,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + deleteUnusedBINKAsToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + helpToolStripMenuItem @@ -653,10 +683,28 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - deleteUnusedBINKAsToolStripMenuItem + + howToAddSongsToolStripMenuItem - + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + whatIsEachCategoryToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + howToEditCreditsToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + optimizeDataFolderToolStripMenuItem + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 From f31009374077a030e4a38c014bf7159150955cc2 Mon Sep 17 00:00:00 2001 From: MattNL Date: Tue, 16 Aug 2022 22:49:03 -0400 Subject: [PATCH 07/18] AudioEditor now checks for changes after saving --- PCK-Studio/Forms/Editor/AudioEditor.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index a3b5560d..39b52418 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -206,6 +206,7 @@ namespace PckStudio.Forms.Editor TreeNode treeNode = new TreeNode(GetCategoryFromId(category.audioType), (int)category.audioType, (int)category.audioType); treeNode.Tag = category; treeView1.Nodes.Add(treeNode); + saved = false; } else { @@ -235,6 +236,7 @@ namespace PckStudio.Forms.Editor if (string.IsNullOrEmpty(ofn.FileName)) return; // Return if name is null or if the user cancels ProcessEntries(ofn.FileNames); + saved = false; } } @@ -245,6 +247,7 @@ namespace PckStudio.Forms.Editor { treeView2.Nodes.Clear(); main.Remove(); + saved = false; } } @@ -266,6 +269,7 @@ namespace PckStudio.Forms.Editor { category.SongNames.Remove(treeView2.SelectedNode.Text); treeView2.SelectedNode.Remove(); + saved = false; } } From 5eddebbefccf6e1469feba1e4b2bb59b35602daf Mon Sep 17 00:00:00 2001 From: MattNL Date: Tue, 16 Aug 2022 22:50:29 -0400 Subject: [PATCH 08/18] Added WAV to BINKA Compression control to AudioEditor --- .../Forms/Editor/AudioEditor.Designer.cs | 47 +++- PCK-Studio/Forms/Editor/AudioEditor.cs | 7 +- PCK-Studio/Forms/Editor/AudioEditor.resx | 230 +++++++++++------- 3 files changed, 197 insertions(+), 87 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs index 2ac5a7f6..48f749c3 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs @@ -53,9 +53,13 @@ namespace PckStudio.Forms.Editor this.whatIsEachCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.compressionUpDown = new System.Windows.Forms.NumericUpDown(); + this.bINKACompressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); this.contextMenuStrip1.SuspendLayout(); this.menuStrip.SuspendLayout(); this.contextMenuStrip2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).BeginInit(); this.SuspendLayout(); // // treeView1 @@ -157,7 +161,8 @@ namespace PckStudio.Forms.Editor this.howToAddSongsToolStripMenuItem, this.whatIsEachCategoryToolStripMenuItem, this.howToEditCreditsToolStripMenuItem, - this.optimizeDataFolderToolStripMenuItem}); + this.optimizeDataFolderToolStripMenuItem, + this.bINKACompressionToolStripMenuItem}); this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White; this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem"); @@ -237,10 +242,46 @@ namespace PckStudio.Forms.Editor resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem"); this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click); // + // compressionUpDown + // + this.compressionUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.compressionUpDown.ForeColor = System.Drawing.SystemColors.Window; + resources.ApplyResources(this.compressionUpDown, "compressionUpDown"); + this.compressionUpDown.Maximum = new decimal(new int[] { + 9, + 0, + 0, + 0}); + this.compressionUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.compressionUpDown.Name = "compressionUpDown"; + this.compressionUpDown.Value = new decimal(new int[] { + 4, + 0, + 0, + 0}); + // + // bINKACompressionToolStripMenuItem + // + this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem"; + resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem"); + this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.bINKACompressionToolStripMenuItem_Click); + // + // metroLabel1 + // + resources.ApplyResources(this.metroLabel1, "metroLabel1"); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark; + // // AudioEditor // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.metroLabel1); + this.Controls.Add(this.compressionUpDown); this.Controls.Add(this.playOverworldInCreative); this.Controls.Add(this.treeView1); this.Controls.Add(this.treeView2); @@ -254,6 +295,7 @@ namespace PckStudio.Forms.Editor this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); this.contextMenuStrip2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -283,5 +325,8 @@ namespace PckStudio.Forms.Editor private System.Windows.Forms.ToolStripMenuItem whatIsEachCategoryToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem howToEditCreditsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem optimizeDataFolderToolStripMenuItem; + private System.Windows.Forms.NumericUpDown compressionUpDown; + private System.Windows.Forms.ToolStripMenuItem bINKACompressionToolStripMenuItem; + private MetroFramework.Controls.MetroLabel metroLabel1; } } \ No newline at end of file diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index 39b52418..441fe755 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -308,7 +308,7 @@ namespace PckStudio.Forms.Editor var process = Process.Start(new ProcessStartInfo { FileName = Path.Combine(tempDir, "binka_encode.exe"), - Arguments = $"\"{file}\" \"{new_loc}\"", + Arguments = $"\"{file}\" \"{new_loc}\" -s -b" + compressionUpDown.Value.ToString(), UseShellExecute = true, CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden @@ -499,5 +499,10 @@ namespace PckStudio.Forms.Editor { MessageBox.Show("Click Tools -> Delete Unused BINKA files. This will clean your folder of any unused songs.", "How to optimize the Data folder"); } + + private void bINKACompressionToolStripMenuItem_Click(object sender, EventArgs e) + { + MessageBox.Show("The numerical up/down control is responsible for the level of compression used when converting WAV files. The default is 4, which was commonly used by 4J for the game's files.","BINKA Compression Level"); + } } } diff --git a/PCK-Studio/Forms/Editor/AudioEditor.resx b/PCK-Studio/Forms/Editor/AudioEditor.resx index f3b322cb..d4d38eaa 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.resx +++ b/PCK-Studio/Forms/Editor/AudioEditor.resx @@ -125,6 +125,26 @@ 127, 8 + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x + DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5 + jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC + + + + 168, 22 + + + Add Category + + + 168, 22 + + + Remove Category + 169, 48 @@ -367,7 +387,7 @@ 0 - 128, 230 + 128, 208 12 @@ -382,27 +402,7 @@ $this - 3 - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x - DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5 - jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC - - - - 168, 22 - - - Add Category - - - 168, 22 - - - Remove Category + 5 19, 8 @@ -410,12 +410,40 @@ False + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAADfSURBVDhPYxg8 + QLt++3yTGbf/Fm599P/Nh49wfPXxq/+rTt37f+Dak/8gOSBgAGEMANIMxGBFyAasPf/0v8GE8//z1t8C + y4HU4DIALIluwLpLL+HiMANAGKoNAWASCavv/n/57gPcgOvP3oENOXj7NViOoAFGU6791+k4ghWD5Aga + QCyGakMAkODcU89R/I8Ng9TgNADk14dPn/8/c+kqVgySgwUqVBsCwAx49urN/zsPHmPFIDmaGvAXJInN + 38gYasBfqDYE0K7dOn/Wvut/sfkdGYPUgJI9VNuAAwYGAGn6yvdevWgPAAAAAElFTkSuQmCC + + + + 180, 22 + + + Save + 37, 20 File + + 192, 22 + + + Credits Editor + + + 192, 22 + + + Delete Unused BINKAs + 46, 20 @@ -423,19 +451,19 @@ Tools - 180, 22 + 245, 22 How to add songs - 195, 22 + 245, 22 What is each category? - 195, 22 + 245, 22 How to edit credits @@ -446,6 +474,12 @@ How to Optimize the Data folder + + 245, 22 + + + BINKA Compression + 44, 20 @@ -474,35 +508,7 @@ $this - 5 - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAADfSURBVDhPYxg8 - QLt++3yTGbf/Fm599P/Nh49wfPXxq/+rTt37f+Dak/8gOSBgAGEMANIMxGBFyAasPf/0v8GE8//z1t8C - y4HU4DIALIluwLpLL+HiMANAGKoNAWASCavv/n/57gPcgOvP3oENOXj7NViOoAFGU6791+k4ghWD5Aga - QCyGakMAkODcU89R/I8Ng9TgNADk14dPn/8/c+kqVgySgwUqVBsCwAx49urN/zsPHmPFIDmaGvAXJInN - 38gYasBfqDYE0K7dOn/Wvut/sfkdGYPUgJI9VNuAAwYGAGn6yvdevWgPAAAAAElFTkSuQmCC - - - - 98, 22 - - - Save - - - 192, 22 - - - Credits Editor - - - 192, 22 - - - Delete Unused BINKAs + 7 Top, Bottom, Left, Right @@ -510,36 +516,6 @@ 282, 8 - - 174, 70 - - - contextMenuStrip2 - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 151, 84 - - - 279, 230 - - - 13 - - - treeView2 - - - System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -566,6 +542,36 @@ Verify File Location + + 174, 70 + + + contextMenuStrip2 + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 151, 84 + + + 279, 208 + + + 13 + + + treeView2 + + + System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + True @@ -591,7 +597,55 @@ $this - 2 + 4 + + + 310, 298 + + + 120, 20 + + + 15 + + + compressionUpDown + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + 93, 299 + + + 211, 19 + + + 16 + + + WAV to BINKA Compression Level: + + + metroLabel1 + + + MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a + + + $this + + + 0 True @@ -707,6 +761,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + bINKACompressionToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + AudioEditor From 5ded1f24a222580715a1dffdfa42701401859739 Mon Sep 17 00:00:00 2001 From: MattNL Date: Thu, 18 Aug 2022 14:17:24 -0400 Subject: [PATCH 09/18] AudioEditor now extracts all MSS resources --- PCK-Studio/Forms/Editor/AudioEditor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index 441fe755..aadf6631 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -139,13 +139,13 @@ namespace PckStudio.Forms.Editor private void handleUtilFiles(bool extractFiles = true) { - //string asiPath = Path.Combine(tempDir, "binkawin.asi"); - //string mssPath = Path.Combine(tempDir, "mss32.dll"); + string asiPath = Path.Combine(tempDir, "binkawin.asi"); + string mssPath = Path.Combine(tempDir, "mss32.dll"); string encoderPath = Path.Combine(tempDir, "binka_encode.exe"); // Deletes files so that System.IO exceptions are avoided - //if (File.Exists(asiPath)) File.Delete(asiPath); - //if (File.Exists(mssPath)) File.Delete(mssPath); + if (File.Exists(asiPath)) File.Delete(asiPath); + if (File.Exists(mssPath)) File.Delete(mssPath); if (File.Exists(encoderPath)) File.Delete(encoderPath); if (Directory.Exists(tempDir)) Directory.Delete(tempDir); From 4b4cbe46523975d042a100493005d4cc8b32e14d Mon Sep 17 00:00:00 2001 From: MattNL Date: Thu, 18 Aug 2022 14:23:17 -0400 Subject: [PATCH 10/18] Fixed Verify File Tool in AudioEditor --- PCK-Studio/Forms/Editor/AudioEditor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index aadf6631..40848396 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -166,7 +166,7 @@ namespace PckStudio.Forms.Editor private void verifyFileLocationToolStripMenuItem_Click(object sender, EventArgs e) { - if (treeView1.SelectedNode.Tag == null || treeView2.SelectedNode.Tag == null) return; + if (treeView1.SelectedNode == null || treeView2.SelectedNode == null) return; var entry = treeView2.SelectedNode; if (string.IsNullOrEmpty(DataDirectory)) getDataDirectory(); @@ -178,7 +178,7 @@ namespace PckStudio.Forms.Editor return; } if (File.Exists(FileName)) MessageBox.Show("\"" + entry.Text + ".binka\" exists in the \"Data\" folder", "File found"); - else MessageBox.Show("\"" + entry.Text + ".binka\" does not exist in the \"Data\" folder", "File missing"); + else MessageBox.Show("\"" + entry.Text + ".binka\" does not exist in the \"Data\" folder. The game will crash when attempting to load this track.", "File missing"); } private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) From 6d336df08b415a4da3b0c924a0418649995e6879 Mon Sep 17 00:00:00 2001 From: MattNL Date: Thu, 18 Aug 2022 14:54:58 -0400 Subject: [PATCH 11/18] Cleaned a bunch of Data Folder code --- PCK-Studio/Forms/Editor/AudioEditor.cs | 53 +++++++++++--------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index 40848396..96d0d197 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -123,6 +123,21 @@ namespace PckStudio.Forms.Editor playOverworldInCreative.Enabled = audioFile.HasCategory(PCKAudioFile.AudioCategory.EAudioType.Creative); } + bool doesDataFolderExist() + { + MainForm parent = Owner.Owner as MainForm; // Gets the MainForm so we can access the Save Location + + DataDirectory = Path.Combine(Path.GetDirectoryName(parent.saveLocation), "Data"); + + if (!Directory.Exists(DataDirectory)) + { + DialogResult result = MessageBox.Show("There is not a \"Data\" folder present in the pack folder. Would you like to create one?", "Folder missing", MessageBoxButtons.YesNo); + if (result == DialogResult.No) return false; + else Directory.CreateDirectory(DataDirectory); + } + return true; + } + // https://stackoverflow.com/a/25064568 by Alik Khilazhev -MattNL private void ExtractResource(string resName, string fName) { @@ -169,14 +184,9 @@ namespace PckStudio.Forms.Editor if (treeView1.SelectedNode == null || treeView2.SelectedNode == null) return; var entry = treeView2.SelectedNode; - if (string.IsNullOrEmpty(DataDirectory)) getDataDirectory(); + if (!doesDataFolderExist()) return; string FileName = Path.Combine(DataDirectory, entry.Text + ".binka"); - Console.WriteLine(FileName); - if (!Directory.Exists(DataDirectory)) - { - MessageBox.Show("There is not a \"Data\" folder present in the pack folder", "Folder missing"); - return; - } + if (File.Exists(FileName)) MessageBox.Show("\"" + entry.Text + ".binka\" exists in the \"Data\" folder", "File found"); else MessageBox.Show("\"" + entry.Text + ".binka\" does not exist in the \"Data\" folder. The game will crash when attempting to load this track.", "File missing"); } @@ -216,16 +226,9 @@ namespace PckStudio.Forms.Editor private void addEntryMenuItem_Click(object sender, EventArgs e) { - if (treeView1.SelectedNode is TreeNode t && t.Tag is PCKAudioFile.AudioCategory && - // Gets the MainForm so we can access the Save Location - Owner.Owner is MainForm parent) + if (treeView1.SelectedNode is TreeNode t && t.Tag is PCKAudioFile.AudioCategory) { - if (string.IsNullOrEmpty(DataDirectory)) getDataDirectory(); - if (!Directory.Exists(DataDirectory)) - { - MessageBox.Show("There is not a \"Data\" folder present in the pack folder", "Folder missing"); - return; - } + if (!doesDataFolderExist()) return; OpenFileDialog ofn = new OpenFileDialog(); ofn.Multiselect = true; @@ -344,14 +347,9 @@ namespace PckStudio.Forms.Editor { //MessageBox.Show((Owner.Owner as MainForm).saveLocation); // Gets the MainForm so we can access the Save Location - if (treeView1.SelectedNode != null && Owner.Owner is MainForm parent) + if (treeView1.SelectedNode != null) { - if (string.IsNullOrEmpty(DataDirectory)) getDataDirectory(); - if (!Directory.Exists(DataDirectory)) - { - MessageBox.Show("There is not a \"Data\" folder present in the pack folder", "Folder missing"); - return; - } + if (!doesDataFolderExist()) return; ProcessEntries((string[])e.Data.GetData(DataFormats.FileDrop, false)); } @@ -440,7 +438,7 @@ namespace PckStudio.Forms.Editor totalSongList.Add(song); } - if (string.IsNullOrEmpty(DataDirectory)) getDataDirectory(); + if (!doesDataFolderExist()) return; int totalDeleted = 0; foreach (string song in Directory.GetFiles(DataDirectory, "*.binka")) { @@ -462,13 +460,6 @@ namespace PckStudio.Forms.Editor MessageBox.Show("Successfully deleted " + totalDeleted + " files", "Done"); } - // For when the Data Directory variable is null, this sets the variable in the form - private void getDataDirectory() - { - MainForm parent = Owner.Owner as MainForm; // Gets the MainForm so we can access the Save Location - DataDirectory = Path.Combine(Path.GetDirectoryName(parent.saveLocation), "Data"); - } - private void howToAddSongsToolStripMenuItem_Click(object sender, EventArgs e) { MessageBox.Show("Right click the right window and press \"Add Entry\" or drag and drop a valid WAV file into the editor's right window. You can also drop other BINKA files, either from the main game or using a tool like BinkMan. The editor will automatically put the song in the Data folder for you.", "How to add a song"); From d48852ad17c3a6d80ef31f65b3ffb5a07c2305c6 Mon Sep 17 00:00:00 2001 From: MattNL Date: Thu, 18 Aug 2022 14:55:26 -0400 Subject: [PATCH 12/18] Added "Open Data Folder" Tool to AudioEditor --- .../Forms/Editor/AudioEditor.Designer.cs | 82 +++--- PCK-Studio/Forms/Editor/AudioEditor.cs | 6 + PCK-Studio/Forms/Editor/AudioEditor.resx | 238 +++++++++--------- 3 files changed, 177 insertions(+), 149 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs index 48f749c3..ddda179f 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs @@ -43,19 +43,20 @@ namespace PckStudio.Forms.Editor this.creditsEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.howToAddSongsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.whatIsEachCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.bINKACompressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.treeView2 = new System.Windows.Forms.TreeView(); this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); this.addEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.removeEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.verifyFileLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.playOverworldInCreative = new MetroFramework.Controls.MetroCheckBox(); - this.howToAddSongsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.whatIsEachCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.compressionUpDown = new System.Windows.Forms.NumericUpDown(); - this.bINKACompressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.openDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStrip1.SuspendLayout(); this.menuStrip.SuspendLayout(); this.contextMenuStrip2.SuspendLayout(); @@ -136,7 +137,8 @@ namespace PckStudio.Forms.Editor // this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.creditsEditorToolStripMenuItem, - this.deleteUnusedBINKAsToolStripMenuItem}); + this.deleteUnusedBINKAsToolStripMenuItem, + this.openDataFolderToolStripMenuItem}); this.toolsToolStripMenuItem.ForeColor = System.Drawing.Color.White; this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem"); @@ -167,6 +169,36 @@ namespace PckStudio.Forms.Editor this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem"); // + // howToAddSongsToolStripMenuItem + // + this.howToAddSongsToolStripMenuItem.Name = "howToAddSongsToolStripMenuItem"; + resources.ApplyResources(this.howToAddSongsToolStripMenuItem, "howToAddSongsToolStripMenuItem"); + this.howToAddSongsToolStripMenuItem.Click += new System.EventHandler(this.howToAddSongsToolStripMenuItem_Click); + // + // whatIsEachCategoryToolStripMenuItem + // + this.whatIsEachCategoryToolStripMenuItem.Name = "whatIsEachCategoryToolStripMenuItem"; + resources.ApplyResources(this.whatIsEachCategoryToolStripMenuItem, "whatIsEachCategoryToolStripMenuItem"); + this.whatIsEachCategoryToolStripMenuItem.Click += new System.EventHandler(this.whatIsEachCategoryToolStripMenuItem_Click); + // + // howToEditCreditsToolStripMenuItem + // + this.howToEditCreditsToolStripMenuItem.Name = "howToEditCreditsToolStripMenuItem"; + resources.ApplyResources(this.howToEditCreditsToolStripMenuItem, "howToEditCreditsToolStripMenuItem"); + this.howToEditCreditsToolStripMenuItem.Click += new System.EventHandler(this.howToEditCreditsToolStripMenuItem_Click); + // + // optimizeDataFolderToolStripMenuItem + // + this.optimizeDataFolderToolStripMenuItem.Name = "optimizeDataFolderToolStripMenuItem"; + resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem"); + this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click); + // + // bINKACompressionToolStripMenuItem + // + this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem"; + resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem"); + this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.bINKACompressionToolStripMenuItem_Click); + // // treeView2 // this.treeView2.AllowDrop = true; @@ -218,30 +250,6 @@ namespace PckStudio.Forms.Editor this.playOverworldInCreative.UseCustomForeColor = true; this.playOverworldInCreative.UseSelectable = true; // - // howToAddSongsToolStripMenuItem - // - this.howToAddSongsToolStripMenuItem.Name = "howToAddSongsToolStripMenuItem"; - resources.ApplyResources(this.howToAddSongsToolStripMenuItem, "howToAddSongsToolStripMenuItem"); - this.howToAddSongsToolStripMenuItem.Click += new System.EventHandler(this.howToAddSongsToolStripMenuItem_Click); - // - // whatIsEachCategoryToolStripMenuItem - // - this.whatIsEachCategoryToolStripMenuItem.Name = "whatIsEachCategoryToolStripMenuItem"; - resources.ApplyResources(this.whatIsEachCategoryToolStripMenuItem, "whatIsEachCategoryToolStripMenuItem"); - this.whatIsEachCategoryToolStripMenuItem.Click += new System.EventHandler(this.whatIsEachCategoryToolStripMenuItem_Click); - // - // howToEditCreditsToolStripMenuItem - // - this.howToEditCreditsToolStripMenuItem.Name = "howToEditCreditsToolStripMenuItem"; - resources.ApplyResources(this.howToEditCreditsToolStripMenuItem, "howToEditCreditsToolStripMenuItem"); - this.howToEditCreditsToolStripMenuItem.Click += new System.EventHandler(this.howToEditCreditsToolStripMenuItem_Click); - // - // optimizeDataFolderToolStripMenuItem - // - this.optimizeDataFolderToolStripMenuItem.Name = "optimizeDataFolderToolStripMenuItem"; - resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem"); - this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click); - // // compressionUpDown // this.compressionUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); @@ -263,12 +271,6 @@ namespace PckStudio.Forms.Editor 0, 0, 0}); - // - // bINKACompressionToolStripMenuItem - // - this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem"; - resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem"); - this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.bINKACompressionToolStripMenuItem_Click); // // metroLabel1 // @@ -276,6 +278,13 @@ namespace PckStudio.Forms.Editor this.metroLabel1.Name = "metroLabel1"; this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark; // + // openDataFolderToolStripMenuItem + // + this.openDataFolderToolStripMenuItem.Image = global::PckStudio.Properties.Resources.ZZFolder; + this.openDataFolderToolStripMenuItem.Name = "openDataFolderToolStripMenuItem"; + resources.ApplyResources(this.openDataFolderToolStripMenuItem, "openDataFolderToolStripMenuItem"); + this.openDataFolderToolStripMenuItem.Click += new System.EventHandler(this.openDataFolderToolStripMenuItem_Click); + // // AudioEditor // resources.ApplyResources(this, "$this"); @@ -328,5 +337,6 @@ namespace PckStudio.Forms.Editor private System.Windows.Forms.NumericUpDown compressionUpDown; private System.Windows.Forms.ToolStripMenuItem bINKACompressionToolStripMenuItem; private MetroFramework.Controls.MetroLabel metroLabel1; + private System.Windows.Forms.ToolStripMenuItem openDataFolderToolStripMenuItem; } } \ No newline at end of file diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index 96d0d197..b04b556f 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -495,5 +495,11 @@ namespace PckStudio.Forms.Editor { MessageBox.Show("The numerical up/down control is responsible for the level of compression used when converting WAV files. The default is 4, which was commonly used by 4J for the game's files.","BINKA Compression Level"); } + + private void openDataFolderToolStripMenuItem_Click(object sender, EventArgs e) + { + if (!doesDataFolderExist()) return; + Process.Start("explorer.exe", DataDirectory); + } } } diff --git a/PCK-Studio/Forms/Editor/AudioEditor.resx b/PCK-Studio/Forms/Editor/AudioEditor.resx index d4d38eaa..31e897ad 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.resx +++ b/PCK-Studio/Forms/Editor/AudioEditor.resx @@ -125,26 +125,6 @@ 127, 8 - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x - DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5 - jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC - - - - 168, 22 - - - Add Category - - - 168, 22 - - - Remove Category - 169, 48 @@ -166,7 +146,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADk - MAAAAk1TRnQBSQFMAgEBCQEAAVABAAFQAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA + MAAAAk1TRnQBSQFMAgEBCQEAAVgBAAFYAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA AwABMAMAAQEBAAEgBgABMBIAAzgB/wM1Af8DNQH/AzMB/wMwAf8DLwH/Ay0B/wMtAf8DJAH/AzsB/wM4 Af8DNQH/Ay0B/wMnAf8DNgH/AzIB/8AAAzgB/wN/Af8DeQH/A3kB/wN5Af8DcQH/A3EB/wN5Af8DeQH/ A3EB/wNxAf8DcQH/A3kB/wN5Af8DfwH/AzIB/8AAAzIB/wN2Af8DsAH/A7AB/wOvAf8DrwH/A68B/wOo @@ -404,28 +384,32 @@ 5 + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x + DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5 + jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC + + + + 168, 22 + + + Add Category + + + 168, 22 + + + Remove Category + 19, 8 False - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAADfSURBVDhPYxg8 - QLt++3yTGbf/Fm599P/Nh49wfPXxq/+rTt37f+Dak/8gOSBgAGEMANIMxGBFyAasPf/0v8GE8//z1t8C - y4HU4DIALIluwLpLL+HiMANAGKoNAWASCavv/n/57gPcgOvP3oENOXj7NViOoAFGU6791+k4ghWD5Aga - QCyGakMAkODcU89R/I8Ng9TgNADk14dPn/8/c+kqVgySgwUqVBsCwAx49urN/zsPHmPFIDmaGvAXJInN - 38gYasBfqDYE0K7dOn/Wvut/sfkdGYPUgJI9VNuAAwYGAGn6yvdevWgPAAAAAElFTkSuQmCC - - - - 180, 22 - - - Save - 37, 20 @@ -444,42 +428,18 @@ Delete Unused BINKAs + + 192, 22 + + + Open Data Folder + 46, 20 Tools - - 245, 22 - - - How to add songs - - - 245, 22 - - - What is each category? - - - 245, 22 - - - How to edit credits - - - 245, 22 - - - How to Optimize the Data folder - - - 245, 22 - - - BINKA Compression - 44, 20 @@ -510,38 +470,58 @@ 7 + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAADfSURBVDhPYxg8 + QLt++3yTGbf/Fm599P/Nh49wfPXxq/+rTt37f+Dak/8gOSBgAGEMANIMxGBFyAasPf/0v8GE8//z1t8C + y4HU4DIALIluwLpLL+HiMANAGKoNAWASCavv/n/57gPcgOvP3oENOXj7NViOoAFGU6791+k4ghWD5Aga + QCyGakMAkODcU89R/I8Ng9TgNADk14dPn/8/c+kqVgySgwUqVBsCwAx49urN/zsPHmPFIDmaGvAXJInN + 38gYasBfqDYE0K7dOn/Wvut/sfkdGYPUgJI9VNuAAwYGAGn6yvdevWgPAAAAAElFTkSuQmCC + + + + 98, 22 + + + Save + + + 245, 22 + + + How to add songs + + + 245, 22 + + + What is each category? + + + 245, 22 + + + How to edit credits + + + 245, 22 + + + How to Optimize the Data folder + + + 245, 22 + + + BINKA Compression + Top, Bottom, Left, Right 282, 8 - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x - DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5 - jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC - - - - 173, 22 - - - Add Entry - - - 173, 22 - - - Remove Entry - - - 173, 22 - - - Verify File Location - 174, 70 @@ -572,6 +552,32 @@ 6 + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x + DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5 + jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC + + + + 173, 22 + + + Add Entry + + + 173, 22 + + + Remove Entry + + + 173, 22 + + + Verify File Location + True @@ -618,7 +624,7 @@ $this - 1 + 3 True @@ -645,7 +651,7 @@ $this - 0 + 2 True @@ -719,24 +725,6 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - addEntryMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - removeEntryMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - verifyFileLocationToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - howToAddSongsToolStripMenuItem @@ -767,6 +755,30 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + addEntryMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + removeEntryMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + verifyFileLocationToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + openDataFolderToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + AudioEditor From 9c132e76af3b177dee9135827020c71475a00fa0 Mon Sep 17 00:00:00 2001 From: MattNL Date: Thu, 18 Aug 2022 15:17:19 -0400 Subject: [PATCH 13/18] Moved and split DataFolder methods --- PCK-Studio/MainForm.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index 40a71f17..78cfb84a 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -22,11 +22,12 @@ namespace PckStudio { public partial class MainForm : MetroFramework.Forms.MetroForm { - public string saveLocation = string.Empty; + string saveLocation = string.Empty; PCKFile currentPCK = null; bool needsUpdate = false; bool saved = true; bool isTemplateFile = false; + string DataDirectory = string.Empty; public MainForm() { @@ -1049,6 +1050,22 @@ namespace PckStudio } } + public bool HasDataFolder() + { + return Directory.Exists(Path.Combine(Path.GetDirectoryName(saveLocation), "Data")); + } + + public bool CreateDataFolder() + { + if (!HasDataFolder()) + { + DialogResult result = MessageBox.Show("There is not a \"Data\" folder present in the pack folder. Would you like to create one?", "Folder missing", MessageBoxButtons.YesNo); + if (result == DialogResult.No) return false; + else Directory.CreateDirectory(DataDirectory); + } + return true; + } + private void treeMeta_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Delete) From 582035c07ccc2e44edd8ee347788b5b04ec12d22 Mon Sep 17 00:00:00 2001 From: MattNL Date: Thu, 18 Aug 2022 15:18:49 -0400 Subject: [PATCH 14/18] AudioEditor now uses MainForm functions for DataFolder --- PCK-Studio/Forms/Editor/AudioEditor.cs | 31 ++++++++------------------ 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index b04b556f..62ec0489 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -27,6 +27,7 @@ namespace PckStudio.Forms.Editor PCKFile.FileData audioPCK; LOCFile loc; bool _isLittleEndian = false; + MainForm parent; // Parent Form public static readonly List Categories = new List { @@ -81,6 +82,7 @@ namespace PckStudio.Forms.Editor // so the Creative songs aren't combined until after the forms are closed. // this will prevent potential problems with editing the categories after merging. this.saveToolStripMenuItem1.Click += (sender, e) => saveToolStripMenuItem1_Click(sender, e, false); + parent = Owner.Owner as MainForm; loc = locFile; tempDir = Path.Combine(Directory.GetCurrentDirectory(), "temp"); _isLittleEndian = isLittleEndian; @@ -123,21 +125,6 @@ namespace PckStudio.Forms.Editor playOverworldInCreative.Enabled = audioFile.HasCategory(PCKAudioFile.AudioCategory.EAudioType.Creative); } - bool doesDataFolderExist() - { - MainForm parent = Owner.Owner as MainForm; // Gets the MainForm so we can access the Save Location - - DataDirectory = Path.Combine(Path.GetDirectoryName(parent.saveLocation), "Data"); - - if (!Directory.Exists(DataDirectory)) - { - DialogResult result = MessageBox.Show("There is not a \"Data\" folder present in the pack folder. Would you like to create one?", "Folder missing", MessageBoxButtons.YesNo); - if (result == DialogResult.No) return false; - else Directory.CreateDirectory(DataDirectory); - } - return true; - } - // https://stackoverflow.com/a/25064568 by Alik Khilazhev -MattNL private void ExtractResource(string resName, string fName) { @@ -168,8 +155,8 @@ namespace PckStudio.Forms.Editor { Directory.CreateDirectory(tempDir); ExtractResource("binka_encode", encoderPath); - //ExtractResource("mss32", mssPath); - //ExtractResource("binkawin", asiPath); + ExtractResource("mss32", mssPath); + ExtractResource("binkawin", asiPath); } } @@ -184,7 +171,7 @@ namespace PckStudio.Forms.Editor if (treeView1.SelectedNode == null || treeView2.SelectedNode == null) return; var entry = treeView2.SelectedNode; - if (!doesDataFolderExist()) return; + if (!parent.CreateDataFolder()) return; string FileName = Path.Combine(DataDirectory, entry.Text + ".binka"); if (File.Exists(FileName)) MessageBox.Show("\"" + entry.Text + ".binka\" exists in the \"Data\" folder", "File found"); @@ -228,7 +215,7 @@ namespace PckStudio.Forms.Editor { if (treeView1.SelectedNode is TreeNode t && t.Tag is PCKAudioFile.AudioCategory) { - if (!doesDataFolderExist()) return; + if (!parent.CreateDataFolder()) return; OpenFileDialog ofn = new OpenFileDialog(); ofn.Multiselect = true; @@ -349,7 +336,7 @@ namespace PckStudio.Forms.Editor // Gets the MainForm so we can access the Save Location if (treeView1.SelectedNode != null) { - if (!doesDataFolderExist()) return; + if (!parent.CreateDataFolder()) return; ProcessEntries((string[])e.Data.GetData(DataFormats.FileDrop, false)); } @@ -438,7 +425,7 @@ namespace PckStudio.Forms.Editor totalSongList.Add(song); } - if (!doesDataFolderExist()) return; + if (!parent.CreateDataFolder()) return; int totalDeleted = 0; foreach (string song in Directory.GetFiles(DataDirectory, "*.binka")) { @@ -498,7 +485,7 @@ namespace PckStudio.Forms.Editor private void openDataFolderToolStripMenuItem_Click(object sender, EventArgs e) { - if (!doesDataFolderExist()) return; + if (!parent.CreateDataFolder()) return; Process.Start("explorer.exe", DataDirectory); } } From 497d7e8327e1f22478c38b21e4b00666bb48e11d Mon Sep 17 00:00:00 2001 From: MattNL Date: Thu, 18 Aug 2022 16:00:19 -0400 Subject: [PATCH 15/18] changed main form data folder methods --- PCK-Studio/MainForm.cs | 154 +++++++++++++++++++++-------------------- 1 file changed, 79 insertions(+), 75 deletions(-) diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index 78cfb84a..9e87453c 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -27,7 +27,6 @@ namespace PckStudio bool needsUpdate = false; bool saved = true; bool isTemplateFile = false; - string DataDirectory = string.Empty; public MainForm() { @@ -52,17 +51,17 @@ namespace PckStudio RPC.Initialize(); RPC.SetPresence("An Open Source .PCK File Editor", "Program by PhoenixARC"); - skinToolStripMenuItem1.Click += (sender, e) => setFileType_Click(sender, e, 0); - capeToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 1); - textureToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 2); - languagesFileLOCToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 6); - gameRulesFileGRFToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 7); - audioPCKFileToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 8); - coloursCOLFileToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 9); - gameRulesHeaderGRHToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 10); - skinsPCKToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 11); - modelsFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 12); - behavioursFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 13); + skinToolStripMenuItem1.Click += (sender, e) => setFileType_Click(sender, e, 0); + capeToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 1); + textureToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 2); + languagesFileLOCToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 6); + gameRulesFileGRFToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 7); + audioPCKFileToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 8); + coloursCOLFileToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 9); + gameRulesHeaderGRHToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 10); + skinsPCKToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 11); + modelsFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 12); + behavioursFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 13); entityMaterialsFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, 14); try @@ -237,7 +236,7 @@ namespace PckStudio } catch (OverflowException ex) { - MessageBox.Show("Failed to open pck\n" + + MessageBox.Show("Failed to open pck\n" + "Try checking the 'Open/Save as Vita/PS4 pck' check box in the upper right corner.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Console.WriteLine(ex.Message); @@ -328,17 +327,17 @@ namespace PckStudio } } - public void editModel(PCKFile.FileData skin) - { - using (generateModel generate = new generateModel(skin.properties, new PictureBox())) - if (generate.ShowDialog() == DialogResult.OK) - { - entryTypeTextBox.Text = ""; - entryDataTextBox.Text = ""; - saved = false; - ReloadMetaTreeView(); - } - } + public void editModel(PCKFile.FileData skin) + { + using (generateModel generate = new generateModel(skin.properties, new PictureBox())) + if (generate.ShowDialog() == DialogResult.OK) + { + entryTypeTextBox.Text = ""; + entryDataTextBox.Text = ""; + saved = false; + ReloadMetaTreeView(); + } + } private void extractToolStripMenuItem_Click(object sender, EventArgs e) { @@ -432,39 +431,39 @@ namespace PckStudio MessageBox.Show("Can't replace a folder."); } - private void deleteFileToolStripMenuItem_Click(object sender, EventArgs e) - { - var node = treeViewMain.SelectedNode; - if (node == null) return; - if (node.Tag is PCKFile.FileData) - { - PCKFile.FileData file = node.Tag as PCKFile.FileData; - // remove loc key if its a skin/cape - if (file.type == 0 || file.type == 1) - { - if (TryGetLocFile(out LOCFile locFile)) - { - foreach (var property in file.properties) - { - if (property.Item1 == "THEMENAMEID" || property.Item1 == "DISPLAYNAMEID") - locFile.RemoveLocKey(property.Item2); - } - TrySetLocFile(locFile); - } - } - currentPCK.Files.Remove(file); - node.Remove(); - saved = false; - } - else if (MessageBox.Show("Are you sure want to delete this folder? All contents will be deleted", "Warning", - MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) - { - string pckFolderDir = node.FullPath; - currentPCK.Files.RemoveAll(file => file.filepath.StartsWith(pckFolderDir)); - node.Remove(); - saved = false; - } - } + private void deleteFileToolStripMenuItem_Click(object sender, EventArgs e) + { + var node = treeViewMain.SelectedNode; + if (node == null) return; + if (node.Tag is PCKFile.FileData) + { + PCKFile.FileData file = node.Tag as PCKFile.FileData; + // remove loc key if its a skin/cape + if (file.type == 0 || file.type == 1) + { + if (TryGetLocFile(out LOCFile locFile)) + { + foreach (var property in file.properties) + { + if (property.Item1 == "THEMENAMEID" || property.Item1 == "DISPLAYNAMEID") + locFile.RemoveLocKey(property.Item2); + } + TrySetLocFile(locFile); + } + } + currentPCK.Files.Remove(file); + node.Remove(); + saved = false; + } + else if (MessageBox.Show("Are you sure want to delete this folder? All contents will be deleted", "Warning", + MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) + { + string pckFolderDir = node.FullPath; + currentPCK.Files.RemoveAll(file => file.filepath.StartsWith(pckFolderDir)); + node.Remove(); + saved = false; + } + } private void renameFileToolStripMenuItem_Click(object sender, EventArgs e) { @@ -598,14 +597,14 @@ namespace PckStudio grfEditor.ShowDialog(); break; - case 8 when file.filepath == "audio.pck": - if (!TryGetLocFile(out LOCFile locFile)) - throw new Exception("No .loc File found."); - AudioEditor audioEditor = new AudioEditor(file, locFile, LittleEndianCheckBox.Checked); - audioEditor.ShowDialog(this); + case 8 when file.filepath == "audio.pck": + if (!TryGetLocFile(out LOCFile locFile)) + throw new Exception("No .loc File found."); + AudioEditor audioEditor = new AudioEditor(file, locFile, LittleEndianCheckBox.Checked); + audioEditor.ShowDialog(this); if (audioEditor.saved) TrySetLocFile(locFile); audioEditor.Dispose(); - break; + break; case 9 when file.filepath == "colours.col": if (file.size == 0) @@ -697,16 +696,16 @@ namespace PckStudio mf.properties.Add(property); } - TreeNode newNode = new TreeNode(); - newNode.Text = newFileName; - newNode.Tag = mf; - newNode.ImageIndex = node.ImageIndex; - newNode.SelectedImageIndex = node.SelectedImageIndex; + TreeNode newNode = new TreeNode(); + newNode.Text = newFileName; + newNode.Tag = mf; + newNode.ImageIndex = node.ImageIndex; + newNode.SelectedImageIndex = node.SelectedImageIndex; - if (node.Parent == null) treeViewMain.Nodes.Insert(node.Index + 1, newNode); //adds generated minefile node - else node.Parent.Nodes.Insert(node.Index + 1, newNode);//adds generated minefile node to selected folder - currentPCK.Files.Insert(node.Index + 1, mf); - } + if (node.Parent == null) treeViewMain.Nodes.Insert(node.Index + 1, newNode); //adds generated minefile node + else node.Parent.Nodes.Insert(node.Index + 1, newNode);//adds generated minefile node to selected folder + currentPCK.Files.Insert(node.Index + 1, mf); + } private void deleteEntryToolStripMenuItem_Click(object sender, EventArgs e) { @@ -1032,7 +1031,7 @@ namespace PckStudio FileInfo file = new FileInfo(filepath); file.Directory.Create(); File.WriteAllBytes(filepath, mf.data); // writes data to file - //attempts to generate reimportable metadata file out of minefiles metadata + //attempts to generate reimportable metadata file out of minefiles metadata string metaData = ""; foreach (var entry in mf.properties) @@ -1050,9 +1049,14 @@ namespace PckStudio } } + public string GetDataPath() + { + return Path.Combine(Path.GetDirectoryName(saveLocation), $"Data"); + } + public bool HasDataFolder() { - return Directory.Exists(Path.Combine(Path.GetDirectoryName(saveLocation), "Data")); + return Directory.Exists(GetDataPath()); } public bool CreateDataFolder() @@ -1061,7 +1065,7 @@ namespace PckStudio { DialogResult result = MessageBox.Show("There is not a \"Data\" folder present in the pack folder. Would you like to create one?", "Folder missing", MessageBoxButtons.YesNo); if (result == DialogResult.No) return false; - else Directory.CreateDirectory(DataDirectory); + else Directory.CreateDirectory(GetDataPath()); } return true; } From 7f88f0934402c058f9235f88079de2b5bf4283dc Mon Sep 17 00:00:00 2001 From: MattNL Date: Thu, 18 Aug 2022 16:01:23 -0400 Subject: [PATCH 16/18] crash fix when accessing owner form --- .../Forms/Editor/AudioEditor.Designer.cs | 1 + PCK-Studio/Forms/Editor/AudioEditor.cs | 22 +++--- PCK-Studio/Forms/Editor/AudioEditor.resx | 72 +++++++++---------- 3 files changed, 49 insertions(+), 46 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs index ddda179f..9698dabe 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs @@ -300,6 +300,7 @@ namespace PckStudio.Forms.Editor this.Theme = MetroFramework.MetroThemeStyle.Dark; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AudioEditor_FormClosing); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AudioEditor_FormClosed); + this.Shown += new System.EventHandler(this.AudioEditor_Shown); this.contextMenuStrip1.ResumeLayout(false); this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index 62ec0489..c0d47720 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -21,13 +21,12 @@ namespace PckStudio.Forms.Editor { public bool saved = false; public string defaultType = "yes"; - private string DataDirectory = ""; string tempDir = ""; PCKAudioFile audioFile = null; PCKFile.FileData audioPCK; LOCFile loc; bool _isLittleEndian = false; - MainForm parent; // Parent Form + MainForm parent = null; public static readonly List Categories = new List { @@ -82,7 +81,6 @@ namespace PckStudio.Forms.Editor // so the Creative songs aren't combined until after the forms are closed. // this will prevent potential problems with editing the categories after merging. this.saveToolStripMenuItem1.Click += (sender, e) => saveToolStripMenuItem1_Click(sender, e, false); - parent = Owner.Owner as MainForm; loc = locFile; tempDir = Path.Combine(Directory.GetCurrentDirectory(), "temp"); _isLittleEndian = isLittleEndian; @@ -121,7 +119,6 @@ namespace PckStudio.Forms.Editor treeNode.Tag = category; treeView1.Nodes.Add(treeNode); } - playOverworldInCreative.Enabled = audioFile.HasCategory(PCKAudioFile.AudioCategory.EAudioType.Creative); } @@ -172,7 +169,7 @@ namespace PckStudio.Forms.Editor var entry = treeView2.SelectedNode; if (!parent.CreateDataFolder()) return; - string FileName = Path.Combine(DataDirectory, entry.Text + ".binka"); + string FileName = Path.Combine(parent.GetDataPath(), entry.Text + ".binka"); if (File.Exists(FileName)) MessageBox.Show("\"" + entry.Text + ".binka\" exists in the \"Data\" folder", "File found"); else MessageBox.Show("\"" + entry.Text + ".binka\" does not exist in the \"Data\" folder. The game will crash when attempting to load this track.", "File missing"); @@ -269,7 +266,7 @@ namespace PckStudio.Forms.Editor { if (Path.GetExtension(file) == ".binka" || Path.GetExtension(file) == ".wav") { - string new_loc = Path.Combine(DataDirectory, Path.GetFileNameWithoutExtension(file) + ".binka"); + string new_loc = Path.Combine(parent.GetDataPath(), Path.GetFileNameWithoutExtension(file) + ".binka"); bool duplicate_song = false; // To handle if a file already in the pack is dropped back in if (File.Exists(new_loc)) { @@ -316,8 +313,8 @@ namespace PckStudio.Forms.Editor else if (!duplicate_song) { Console.WriteLine(Path.GetFileName(file)); - File.Delete(Path.Combine(DataDirectory, Path.GetFileName(file))); - File.Copy(file, Path.Combine(DataDirectory, Path.GetFileName(file))); + File.Delete(Path.Combine(parent.GetDataPath(), Path.GetFileName(file))); + File.Copy(file, Path.Combine(parent.GetDataPath(), Path.GetFileName(file))); } var songName = Path.GetFileNameWithoutExtension(file); @@ -427,7 +424,7 @@ namespace PckStudio.Forms.Editor if (!parent.CreateDataFolder()) return; int totalDeleted = 0; - foreach (string song in Directory.GetFiles(DataDirectory, "*.binka")) + foreach (string song in Directory.GetFiles(parent.GetDataPath(), "*.binka")) { if (!totalSongList.Contains(Path.GetFileNameWithoutExtension(song))) { @@ -486,7 +483,12 @@ namespace PckStudio.Forms.Editor private void openDataFolderToolStripMenuItem_Click(object sender, EventArgs e) { if (!parent.CreateDataFolder()) return; - Process.Start("explorer.exe", DataDirectory); + Process.Start("explorer.exe", parent.GetDataPath()); + } + + private void AudioEditor_Shown(object sender, EventArgs e) + { + parent = this.Owner.Owner as MainForm; } } } diff --git a/PCK-Studio/Forms/Editor/AudioEditor.resx b/PCK-Studio/Forms/Editor/AudioEditor.resx index 31e897ad..4bc90331 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.resx +++ b/PCK-Studio/Forms/Editor/AudioEditor.resx @@ -410,42 +410,6 @@ False - - 37, 20 - - - File - - - 192, 22 - - - Credits Editor - - - 192, 22 - - - Delete Unused BINKAs - - - 192, 22 - - - Open Data Folder - - - 46, 20 - - - Tools - - - 44, 20 - - - Help - 20, 60 @@ -470,6 +434,12 @@ 7 + + 37, 20 + + + File + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -486,6 +456,30 @@ Save + + 46, 20 + + + Tools + + + 192, 22 + + + Credits Editor + + + 192, 22 + + + Delete Unused BINKAs + + + 44, 20 + + + Help + 245, 22 @@ -653,6 +647,12 @@ 2 + + 192, 22 + + + Open Data Folder + True From 3ad1d038adb9616d662ef8b61ed2868bd730e064 Mon Sep 17 00:00:00 2001 From: MattNL Date: Thu, 18 Aug 2022 16:45:50 -0400 Subject: [PATCH 17/18] fixed method name and added check --- PCK-Studio/Forms/Editor/AudioEditor.Designer.cs | 2 +- PCK-Studio/Forms/Editor/AudioEditor.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs index 9698dabe..208b420a 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs @@ -197,7 +197,7 @@ namespace PckStudio.Forms.Editor // this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem"; resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem"); - this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.bINKACompressionToolStripMenuItem_Click); + this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.BINKACompressionToolStripMenuItem_Click); // // treeView2 // diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index c0d47720..f6ea7d08 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -475,7 +475,7 @@ namespace PckStudio.Forms.Editor MessageBox.Show("Click Tools -> Delete Unused BINKA files. This will clean your folder of any unused songs.", "How to optimize the Data folder"); } - private void bINKACompressionToolStripMenuItem_Click(object sender, EventArgs e) + private void BINKACompressionToolStripMenuItem_Click(object sender, EventArgs e) { MessageBox.Show("The numerical up/down control is responsible for the level of compression used when converting WAV files. The default is 4, which was commonly used by 4J for the game's files.","BINKA Compression Level"); } @@ -488,7 +488,8 @@ namespace PckStudio.Forms.Editor private void AudioEditor_Shown(object sender, EventArgs e) { - parent = this.Owner.Owner as MainForm; + if (Owner.Owner is MainForm) parent = Owner.Owner as MainForm; + else Close(); } } } From 075b8b1d8516e8b88de66840be7d639333e0ba7f Mon Sep 17 00:00:00 2001 From: MattNL Date: Thu, 18 Aug 2022 17:05:45 -0400 Subject: [PATCH 18/18] changed open file filter for AudioEditor --- PCK-Studio/Forms/Editor/AudioEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index f6ea7d08..15ab70a6 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -216,7 +216,7 @@ namespace PckStudio.Forms.Editor OpenFileDialog ofn = new OpenFileDialog(); ofn.Multiselect = true; - ofn.Filter = "BINKA files (*.binka)|*.binka|WAV files (*.wav)|*.wav"; + ofn.Filter = "Supported audio files (*.binka,*.wav)|*.binka;*.wav"; ofn.Title = "Please choose WAV or BINKA files to add to your pack"; ofn.ShowDialog(); ofn.Dispose();