From d83135d284133018ab3b1c2a779580eb046a05ab Mon Sep 17 00:00:00 2001 From: dexy Date: Fri, 12 Jul 2024 13:48:43 +1000 Subject: [PATCH] PR #236 but with minor improvements --- .../Panels/EditYtypArchetypePanel.Designer.cs | 144 +++++++++----- .../Project/Panels/EditYtypArchetypePanel.cs | 184 ++++++++++-------- 2 files changed, 198 insertions(+), 130 deletions(-) diff --git a/CodeWalker/Project/Panels/EditYtypArchetypePanel.Designer.cs b/CodeWalker/Project/Panels/EditYtypArchetypePanel.Designer.cs index 36ae27d..e464c9a 100644 --- a/CodeWalker/Project/Panels/EditYtypArchetypePanel.Designer.cs +++ b/CodeWalker/Project/Panels/EditYtypArchetypePanel.Designer.cs @@ -39,6 +39,7 @@ this.ArchetypeNameTextBox = new System.Windows.Forms.TextBox(); this.ArchetypeFlagsTextBox = new System.Windows.Forms.TextBox(); this.PhysicsDictionaryTextBox = new System.Windows.Forms.TextBox(); + this.DrawableDictionaryTextBox = new System.Windows.Forms.TextBox(); this.ClipDictionaryTextBox = new System.Windows.Forms.TextBox(); this.AssetNameTextBox = new System.Windows.Forms.TextBox(); this.TextureDictTextBox = new System.Windows.Forms.TextBox(); @@ -46,6 +47,7 @@ this.label11 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.PhysicsDictHashLabel = new System.Windows.Forms.Label(); + this.DrawableDictHashLabel = new System.Windows.Forms.Label(); this.TextureDictHashLabel = new System.Windows.Forms.Label(); this.EntityFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); this.label14 = new System.Windows.Forms.Label(); @@ -55,6 +57,7 @@ this.AssetTypeComboBox = new System.Windows.Forms.ComboBox(); this.label8 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.HDTextureDistNumericUpDown = new System.Windows.Forms.NumericUpDown(); @@ -89,6 +92,7 @@ this.BaseArchetypeTabPage.Controls.Add(this.ArchetypeNameTextBox); this.BaseArchetypeTabPage.Controls.Add(this.ArchetypeFlagsTextBox); this.BaseArchetypeTabPage.Controls.Add(this.PhysicsDictionaryTextBox); + this.BaseArchetypeTabPage.Controls.Add(this.DrawableDictionaryTextBox); this.BaseArchetypeTabPage.Controls.Add(this.ClipDictionaryTextBox); this.BaseArchetypeTabPage.Controls.Add(this.AssetNameTextBox); this.BaseArchetypeTabPage.Controls.Add(this.TextureDictTextBox); @@ -96,6 +100,7 @@ this.BaseArchetypeTabPage.Controls.Add(this.label11); this.BaseArchetypeTabPage.Controls.Add(this.label5); this.BaseArchetypeTabPage.Controls.Add(this.PhysicsDictHashLabel); + this.BaseArchetypeTabPage.Controls.Add(this.DrawableDictHashLabel); this.BaseArchetypeTabPage.Controls.Add(this.TextureDictHashLabel); this.BaseArchetypeTabPage.Controls.Add(this.EntityFlagsCheckedListBox); this.BaseArchetypeTabPage.Controls.Add(this.label14); @@ -105,6 +110,7 @@ this.BaseArchetypeTabPage.Controls.Add(this.AssetTypeComboBox); this.BaseArchetypeTabPage.Controls.Add(this.label8); this.BaseArchetypeTabPage.Controls.Add(this.label7); + this.BaseArchetypeTabPage.Controls.Add(this.label17); this.BaseArchetypeTabPage.Controls.Add(this.label6); this.BaseArchetypeTabPage.Controls.Add(this.label4); this.BaseArchetypeTabPage.Controls.Add(this.HDTextureDistNumericUpDown); @@ -126,7 +132,7 @@ this.ArchetypeDeleteButton.Location = new System.Drawing.Point(110, 439); this.ArchetypeDeleteButton.Name = "ArchetypeDeleteButton"; this.ArchetypeDeleteButton.Size = new System.Drawing.Size(126, 23); - this.ArchetypeDeleteButton.TabIndex = 79; + this.ArchetypeDeleteButton.TabIndex = 58; this.ArchetypeDeleteButton.Text = "Delete Archetype"; this.ArchetypeDeleteButton.UseVisualStyleBackColor = true; this.ArchetypeDeleteButton.Click += new System.EventHandler(this.DeleteArchetypeButton_Click); @@ -138,7 +144,7 @@ this.label13.Location = new System.Drawing.Point(8, 405); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(57, 13); - this.label13.TabIndex = 78; + this.label13.TabIndex = 56; this.label13.Text = "BSRadius:"; // // BSRadiusTextBox @@ -148,7 +154,7 @@ this.BSRadiusTextBox.Location = new System.Drawing.Point(71, 402); this.BSRadiusTextBox.Name = "BSRadiusTextBox"; this.BSRadiusTextBox.Size = new System.Drawing.Size(552, 20); - this.BSRadiusTextBox.TabIndex = 77; + this.BSRadiusTextBox.TabIndex = 57; this.BSRadiusTextBox.TextChanged += new System.EventHandler(this.BSRadiusTextBox_TextChanged); // // BSCenterTextBox @@ -158,7 +164,7 @@ this.BSCenterTextBox.Location = new System.Drawing.Point(71, 376); this.BSCenterTextBox.Name = "BSCenterTextBox"; this.BSCenterTextBox.Size = new System.Drawing.Size(552, 20); - this.BSCenterTextBox.TabIndex = 75; + this.BSCenterTextBox.TabIndex = 55; this.BSCenterTextBox.TextChanged += new System.EventHandler(this.BSCenterTextBox_TextChanged); // // BBMaxTextBox @@ -168,7 +174,7 @@ this.BBMaxTextBox.Location = new System.Drawing.Point(71, 350); this.BBMaxTextBox.Name = "BBMaxTextBox"; this.BBMaxTextBox.Size = new System.Drawing.Size(552, 20); - this.BBMaxTextBox.TabIndex = 73; + this.BBMaxTextBox.TabIndex = 53; this.BBMaxTextBox.TextChanged += new System.EventHandler(this.BBMaxTextBox_TextChanged); // // BBMinTextBox @@ -178,17 +184,17 @@ this.BBMinTextBox.Location = new System.Drawing.Point(71, 324); this.BBMinTextBox.Name = "BBMinTextBox"; this.BBMinTextBox.Size = new System.Drawing.Size(552, 20); - this.BBMinTextBox.TabIndex = 71; + this.BBMinTextBox.TabIndex = 51; this.BBMinTextBox.TextChanged += new System.EventHandler(this.BBMinTextBox_TextChanged); // // ArchetypeNameTextBox // this.ArchetypeNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.ArchetypeNameTextBox.Location = new System.Drawing.Point(110, 9); + this.ArchetypeNameTextBox.Location = new System.Drawing.Point(113, 9); this.ArchetypeNameTextBox.Name = "ArchetypeNameTextBox"; this.ArchetypeNameTextBox.Size = new System.Drawing.Size(247, 20); - this.ArchetypeNameTextBox.TabIndex = 70; + this.ArchetypeNameTextBox.TabIndex = 11; this.ArchetypeNameTextBox.TextChanged += new System.EventHandler(this.ArchetypeNameTextBox_TextChanged); // // ArchetypeFlagsTextBox @@ -197,47 +203,57 @@ this.ArchetypeFlagsTextBox.Location = new System.Drawing.Point(476, 12); this.ArchetypeFlagsTextBox.Name = "ArchetypeFlagsTextBox"; this.ArchetypeFlagsTextBox.Size = new System.Drawing.Size(147, 20); - this.ArchetypeFlagsTextBox.TabIndex = 66; + this.ArchetypeFlagsTextBox.TabIndex = 34; this.ArchetypeFlagsTextBox.TextChanged += new System.EventHandler(this.ArchetypeFlagsTextBox_TextChanged); // // PhysicsDictionaryTextBox // this.PhysicsDictionaryTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.PhysicsDictionaryTextBox.Location = new System.Drawing.Point(110, 191); + this.PhysicsDictionaryTextBox.Location = new System.Drawing.Point(113, 217); this.PhysicsDictionaryTextBox.Name = "PhysicsDictionaryTextBox"; this.PhysicsDictionaryTextBox.Size = new System.Drawing.Size(206, 20); - this.PhysicsDictionaryTextBox.TabIndex = 60; + this.PhysicsDictionaryTextBox.TabIndex = 29; this.PhysicsDictionaryTextBox.TextChanged += new System.EventHandler(this.PhysicsDictionaryTextBox_TextChanged); // + // DrawableDictionaryTextBox + // + this.DrawableDictionaryTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.DrawableDictionaryTextBox.Location = new System.Drawing.Point(113, 191); + this.DrawableDictionaryTextBox.Name = "DrawableDictionaryTextBox"; + this.DrawableDictionaryTextBox.Size = new System.Drawing.Size(206, 20); + this.DrawableDictionaryTextBox.TabIndex = 26; + this.DrawableDictionaryTextBox.TextChanged += new System.EventHandler(this.DrawableDictionaryTextBox_TextChanged); + // // ClipDictionaryTextBox // this.ClipDictionaryTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.ClipDictionaryTextBox.Location = new System.Drawing.Point(110, 165); + this.ClipDictionaryTextBox.Location = new System.Drawing.Point(113, 165); this.ClipDictionaryTextBox.Name = "ClipDictionaryTextBox"; this.ClipDictionaryTextBox.Size = new System.Drawing.Size(247, 20); - this.ClipDictionaryTextBox.TabIndex = 58; + this.ClipDictionaryTextBox.TabIndex = 24; this.ClipDictionaryTextBox.TextChanged += new System.EventHandler(this.ClipDictionaryTextBox_TextChanged); // // AssetNameTextBox // this.AssetNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.AssetNameTextBox.Location = new System.Drawing.Point(110, 35); + this.AssetNameTextBox.Location = new System.Drawing.Point(113, 35); this.AssetNameTextBox.Name = "AssetNameTextBox"; this.AssetNameTextBox.Size = new System.Drawing.Size(247, 20); - this.AssetNameTextBox.TabIndex = 56; + this.AssetNameTextBox.TabIndex = 13; this.AssetNameTextBox.TextChanged += new System.EventHandler(this.AssetNameTextBox_TextChanged); // // TextureDictTextBox // this.TextureDictTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.TextureDictTextBox.Location = new System.Drawing.Point(110, 139); + this.TextureDictTextBox.Location = new System.Drawing.Point(113, 139); this.TextureDictTextBox.Name = "TextureDictTextBox"; this.TextureDictTextBox.Size = new System.Drawing.Size(206, 20); - this.TextureDictTextBox.TabIndex = 54; + this.TextureDictTextBox.TabIndex = 21; this.TextureDictTextBox.TextChanged += new System.EventHandler(this.TextureDictTextBox_TextChanged); // // label12 @@ -247,7 +263,7 @@ this.label12.Location = new System.Drawing.Point(8, 379); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(55, 13); - this.label12.TabIndex = 76; + this.label12.TabIndex = 54; this.label12.Text = "BSCenter:"; // // label11 @@ -257,7 +273,7 @@ this.label11.Location = new System.Drawing.Point(19, 353); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(44, 13); - this.label11.TabIndex = 74; + this.label11.TabIndex = 52; this.label11.Text = "BBMax:"; // // label5 @@ -267,27 +283,37 @@ this.label5.Location = new System.Drawing.Point(24, 327); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(41, 13); - this.label5.TabIndex = 72; + this.label5.TabIndex = 50; this.label5.Text = "BBMin:"; // // PhysicsDictHashLabel // this.PhysicsDictHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.PhysicsDictHashLabel.AutoSize = true; - this.PhysicsDictHashLabel.Location = new System.Drawing.Point(322, 194); + this.PhysicsDictHashLabel.Location = new System.Drawing.Point(325, 220); this.PhysicsDictHashLabel.Name = "PhysicsDictHashLabel"; this.PhysicsDictHashLabel.Size = new System.Drawing.Size(35, 13); - this.PhysicsDictHashLabel.TabIndex = 69; + this.PhysicsDictHashLabel.TabIndex = 30; this.PhysicsDictHashLabel.Text = "Hash:"; // + // DrawableDictHashLabel + // + this.DrawableDictHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.DrawableDictHashLabel.AutoSize = true; + this.DrawableDictHashLabel.Location = new System.Drawing.Point(325, 194); + this.DrawableDictHashLabel.Name = "DrawableDictHashLabel"; + this.DrawableDictHashLabel.Size = new System.Drawing.Size(35, 13); + this.DrawableDictHashLabel.TabIndex = 27; + this.DrawableDictHashLabel.Text = "Hash:"; + // // TextureDictHashLabel // this.TextureDictHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.TextureDictHashLabel.AutoSize = true; - this.TextureDictHashLabel.Location = new System.Drawing.Point(322, 142); + this.TextureDictHashLabel.Location = new System.Drawing.Point(325, 142); this.TextureDictHashLabel.Name = "TextureDictHashLabel"; this.TextureDictHashLabel.Size = new System.Drawing.Size(35, 13); - this.TextureDictHashLabel.TabIndex = 68; + this.TextureDictHashLabel.TabIndex = 22; this.TextureDictHashLabel.Text = "Hash:"; // // EntityFlagsCheckedListBox @@ -332,7 +358,7 @@ this.EntityFlagsCheckedListBox.Location = new System.Drawing.Point(441, 38); this.EntityFlagsCheckedListBox.Name = "EntityFlagsCheckedListBox"; this.EntityFlagsCheckedListBox.Size = new System.Drawing.Size(182, 274); - this.EntityFlagsCheckedListBox.TabIndex = 67; + this.EntityFlagsCheckedListBox.TabIndex = 35; this.EntityFlagsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ArchetypeFlagsCheckedListBox_ItemCheck); // // label14 @@ -342,14 +368,14 @@ this.label14.Location = new System.Drawing.Point(419, 15); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(35, 13); - this.label14.TabIndex = 65; + this.label14.TabIndex = 33; this.label14.Text = "Flags:"; // // SpecialAttributeNumericUpDown // this.SpecialAttributeNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.SpecialAttributeNumericUpDown.Location = new System.Drawing.Point(110, 113); + this.SpecialAttributeNumericUpDown.Location = new System.Drawing.Point(113, 113); this.SpecialAttributeNumericUpDown.Maximum = new decimal(new int[] { 9999999, 0, @@ -357,25 +383,25 @@ 0}); this.SpecialAttributeNumericUpDown.Name = "SpecialAttributeNumericUpDown"; this.SpecialAttributeNumericUpDown.Size = new System.Drawing.Size(247, 20); - this.SpecialAttributeNumericUpDown.TabIndex = 64; + this.SpecialAttributeNumericUpDown.TabIndex = 19; this.SpecialAttributeNumericUpDown.ValueChanged += new System.EventHandler(this.SpecialAttributeNumericUpDown_ValueChanged); // // label10 // this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(17, 115); + this.label10.Location = new System.Drawing.Point(20, 115); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(87, 13); - this.label10.TabIndex = 63; + this.label10.TabIndex = 18; this.label10.Text = "Special Attribute:"; // // label9 // this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(41, 220); + this.label9.Location = new System.Drawing.Point(44, 246); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(63, 13); - this.label9.TabIndex = 62; + this.label9.TabIndex = 31; this.label9.Text = "Asset Type:"; // // AssetTypeComboBox @@ -384,45 +410,54 @@ | System.Windows.Forms.AnchorStyles.Right))); this.AssetTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.AssetTypeComboBox.FormattingEnabled = true; - this.AssetTypeComboBox.Location = new System.Drawing.Point(110, 217); + this.AssetTypeComboBox.Location = new System.Drawing.Point(113, 243); this.AssetTypeComboBox.Name = "AssetTypeComboBox"; this.AssetTypeComboBox.Size = new System.Drawing.Size(247, 21); - this.AssetTypeComboBox.TabIndex = 61; + this.AssetTypeComboBox.TabIndex = 32; // // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(8, 194); + this.label8.Location = new System.Drawing.Point(11, 220); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(96, 13); - this.label8.TabIndex = 59; + this.label8.TabIndex = 28; this.label8.Text = "Physics Dictionary:"; // // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(27, 168); + this.label7.Location = new System.Drawing.Point(30, 168); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(77, 13); - this.label7.TabIndex = 57; + this.label7.TabIndex = 23; this.label7.Text = "Clip Dictionary:"; // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(2, 194); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(105, 13); + this.label17.TabIndex = 25; + this.label17.Text = "Drawable Dictionary:"; + // // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(37, 38); + this.label6.Location = new System.Drawing.Point(40, 38); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(67, 13); - this.label6.TabIndex = 55; + this.label6.TabIndex = 12; this.label6.Text = "Asset Name:"; // // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(8, 142); + this.label4.Location = new System.Drawing.Point(11, 142); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(96, 13); - this.label4.TabIndex = 53; + this.label4.TabIndex = 20; this.label4.Text = "Texture Dictionary:"; // // HDTextureDistNumericUpDown @@ -430,7 +465,7 @@ this.HDTextureDistNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.HDTextureDistNumericUpDown.DecimalPlaces = 8; - this.HDTextureDistNumericUpDown.Location = new System.Drawing.Point(110, 87); + this.HDTextureDistNumericUpDown.Location = new System.Drawing.Point(113, 87); this.HDTextureDistNumericUpDown.Maximum = new decimal(new int[] { 9999999, 0, @@ -438,16 +473,16 @@ 0}); this.HDTextureDistNumericUpDown.Name = "HDTextureDistNumericUpDown"; this.HDTextureDistNumericUpDown.Size = new System.Drawing.Size(247, 20); - this.HDTextureDistNumericUpDown.TabIndex = 52; + this.HDTextureDistNumericUpDown.TabIndex = 17; this.HDTextureDistNumericUpDown.ValueChanged += new System.EventHandler(this.HDTextureDistNumericUpDown_ValueChanged); // // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(18, 89); + this.label3.Location = new System.Drawing.Point(21, 89); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(86, 13); - this.label3.TabIndex = 51; + this.label3.TabIndex = 16; this.label3.Text = "HD Texture Dist:"; // // LodDistNumericUpDown @@ -455,7 +490,7 @@ this.LodDistNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.LodDistNumericUpDown.DecimalPlaces = 8; - this.LodDistNumericUpDown.Location = new System.Drawing.Point(110, 61); + this.LodDistNumericUpDown.Location = new System.Drawing.Point(113, 61); this.LodDistNumericUpDown.Maximum = new decimal(new int[] { 9999999, 0, @@ -463,25 +498,25 @@ 0}); this.LodDistNumericUpDown.Name = "LodDistNumericUpDown"; this.LodDistNumericUpDown.Size = new System.Drawing.Size(247, 20); - this.LodDistNumericUpDown.TabIndex = 50; + this.LodDistNumericUpDown.TabIndex = 15; this.LodDistNumericUpDown.ValueChanged += new System.EventHandler(this.LodDistNumericUpDown_ValueChanged); // // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(55, 63); + this.label2.Location = new System.Drawing.Point(58, 63); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(49, 13); - this.label2.TabIndex = 49; + this.label2.TabIndex = 14; this.label2.Text = "Lod Dist:"; // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(66, 12); + this.label1.Location = new System.Drawing.Point(69, 12); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(38, 13); - this.label1.TabIndex = 48; + this.label1.TabIndex = 10; this.label1.Text = "Name:"; // // TabControl @@ -494,7 +529,7 @@ this.TabControl.Name = "TabControl"; this.TabControl.SelectedIndex = 0; this.TabControl.Size = new System.Drawing.Size(639, 505); - this.TabControl.TabIndex = 48; + this.TabControl.TabIndex = 0; // // MloArchetypeTabPage // @@ -628,12 +663,14 @@ private System.Windows.Forms.TextBox ArchetypeFlagsTextBox; private System.Windows.Forms.TextBox PhysicsDictionaryTextBox; private System.Windows.Forms.TextBox ClipDictionaryTextBox; + private System.Windows.Forms.TextBox DrawableDictionaryTextBox; private System.Windows.Forms.TextBox AssetNameTextBox; private System.Windows.Forms.TextBox TextureDictTextBox; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label PhysicsDictHashLabel; + private System.Windows.Forms.Label DrawableDictHashLabel; private System.Windows.Forms.Label TextureDictHashLabel; private System.Windows.Forms.CheckedListBox EntityFlagsCheckedListBox; private System.Windows.Forms.Label label14; @@ -643,6 +680,7 @@ private System.Windows.Forms.ComboBox AssetTypeComboBox; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label17; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label4; private System.Windows.Forms.NumericUpDown HDTextureDistNumericUpDown; diff --git a/CodeWalker/Project/Panels/EditYtypArchetypePanel.cs b/CodeWalker/Project/Panels/EditYtypArchetypePanel.cs index 3a9c365..437efc3 100644 --- a/CodeWalker/Project/Panels/EditYtypArchetypePanel.cs +++ b/CodeWalker/Project/Panels/EditYtypArchetypePanel.cs @@ -52,6 +52,7 @@ namespace CodeWalker.Project.Panels ArchetypeFlagsTextBox.Text = CurrentArchetype._BaseArchetypeDef.flags.ToString(); TextureDictTextBox.Text = CurrentArchetype._BaseArchetypeDef.textureDictionary.ToCleanString(); ClipDictionaryTextBox.Text = CurrentArchetype._BaseArchetypeDef.clipDictionary.ToCleanString(); + DrawableDictionaryTextBox.Text = CurrentArchetype._BaseArchetypeDef.drawableDictionary.ToCleanString(); PhysicsDictionaryTextBox.Text = CurrentArchetype._BaseArchetypeDef.physicsDictionary.ToCleanString(); AssetTypeComboBox.Text = CurrentArchetype._BaseArchetypeDef.assetType.ToString(); BBMinTextBox.Text = FloatUtil.GetVector3String(CurrentArchetype._BaseArchetypeDef.bbMin); @@ -146,85 +147,10 @@ namespace CodeWalker.Project.Panels } } - private void TextureDictTextBox_TextChanged(object sender, EventArgs e) - { - // Check that the form is not null before locking... - if (ProjectForm == null) - return; - - lock (ProjectForm.ProjectSyncRoot) - { - // Embedded... - if (TextureDictTextBox.Text == ArchetypeNameTextBox.Text) - { - TextureDictHashLabel.Text = "Embedded"; - CurrentArchetype._BaseArchetypeDef.textureDictionary = CurrentArchetype._BaseArchetypeDef.name; - return; - } - - var hash = 0u; - if (!uint.TryParse(TextureDictTextBox.Text, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(TextureDictTextBox.Text); - } - - if (CurrentArchetype._BaseArchetypeDef.textureDictionary != hash) - { - var ytd = ProjectForm.GameFileCache.GetYtd(hash); - if (ytd == null) - { - TextureDictHashLabel.Text = "Hash: " + hash.ToString() + " (invalid)"; - ProjectForm.SetYtypHasChanged(true); - return; - } - CurrentArchetype._BaseArchetypeDef.textureDictionary = hash; - ProjectForm.SetYtypHasChanged(true); - } - TextureDictHashLabel.Text = "Hash: " + hash.ToString(); - } - } - - private void PhysicsDictionaryTextBox_TextChanged(object sender, EventArgs e) - { - lock (ProjectForm.ProjectSyncRoot) - { - if (ProjectForm == null) - { - return; - } - - // Embedded... - if (PhysicsDictionaryTextBox.Text == ArchetypeNameTextBox.Text) - { - PhysicsDictHashLabel.Text = "Embedded"; - CurrentArchetype._BaseArchetypeDef.physicsDictionary = CurrentArchetype._BaseArchetypeDef.name; - return; - } - - var hash = 0u; - if (!uint.TryParse(PhysicsDictionaryTextBox.Text, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(PhysicsDictionaryTextBox.Text); - } - - if (CurrentArchetype._BaseArchetypeDef.physicsDictionary != hash) - { - var ytd = ProjectForm.GameFileCache.GetYbn(hash); - if (ytd == null) - { - PhysicsDictHashLabel.Text = "Hash: " + hash.ToString() + " (invalid)"; - ProjectForm.SetYtypHasChanged(true); - return; - } - CurrentArchetype._BaseArchetypeDef.physicsDictionary = hash; - ProjectForm.SetYtypHasChanged(true); - } - PhysicsDictHashLabel.Text = "Hash: " + hash.ToString(); - } - } - private void ArchetypeNameTextBox_TextChanged(object sender, EventArgs e) { + if (ProjectForm == null) return; + var hash = 0u; if (!uint.TryParse(ArchetypeNameTextBox.Text, out hash))//don't re-hash hashes { @@ -246,6 +172,8 @@ namespace CodeWalker.Project.Panels private void AssetNameTextBox_TextChanged(object sender, EventArgs e) { + if (ProjectForm == null) return; + var hash = 0u; if (!uint.TryParse(AssetNameTextBox.Text, out hash))//don't re-hash hashes { @@ -259,8 +187,46 @@ namespace CodeWalker.Project.Panels } } + private void TextureDictTextBox_TextChanged(object sender, EventArgs e) + { + if (ProjectForm == null) return; + + lock (ProjectForm.ProjectSyncRoot) + { + // Embedded... + if (TextureDictTextBox.Text == ArchetypeNameTextBox.Text) + { + TextureDictHashLabel.Text = "Embedded"; + CurrentArchetype._BaseArchetypeDef.textureDictionary = CurrentArchetype._BaseArchetypeDef.name; + return; + } + + var hash = 0u; + if (!uint.TryParse(TextureDictTextBox.Text, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(TextureDictTextBox.Text); + } + + if (CurrentArchetype._BaseArchetypeDef.textureDictionary != hash) + { + CurrentArchetype._BaseArchetypeDef.textureDictionary = hash; + var ytd = ProjectForm.GameFileCache.GetYtd(hash); + if (ytd == null) + { + TextureDictHashLabel.Text = "Hash: " + hash.ToString() + " (invalid)"; + ProjectForm.SetYtypHasChanged(true); + return; + } + ProjectForm.SetYtypHasChanged(true); + } + TextureDictHashLabel.Text = "Hash: " + hash.ToString(); + } + } + private void ClipDictionaryTextBox_TextChanged(object sender, EventArgs e) { + if (ProjectForm == null) return; + var hash = 0u; if (!uint.TryParse(ClipDictionaryTextBox.Text, out hash))//don't re-hash hashes { @@ -274,6 +240,70 @@ namespace CodeWalker.Project.Panels } } + private void DrawableDictionaryTextBox_TextChanged(object sender, EventArgs e) + { + if (ProjectForm == null) return; + + lock (ProjectForm.ProjectSyncRoot) + { + var hash = 0u; + if (!uint.TryParse(DrawableDictionaryTextBox.Text, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(DrawableDictionaryTextBox.Text); + } + + if (CurrentArchetype._BaseArchetypeDef.drawableDictionary != hash) + { + CurrentArchetype._BaseArchetypeDef.drawableDictionary = hash; + var ydd = ProjectForm.GameFileCache.GetYdd(hash); + if (ydd == null) + { + DrawableDictHashLabel.Text = "Hash: " + hash.ToString() + " (invalid)"; + ProjectForm.SetYtypHasChanged(true); + return; + } + ProjectForm.SetYtypHasChanged(true); + } + DrawableDictHashLabel.Text = "Hash: " + hash.ToString(); + } + } + + private void PhysicsDictionaryTextBox_TextChanged(object sender, EventArgs e) + { + if (ProjectForm == null) return; + + lock (ProjectForm.ProjectSyncRoot) + { + // Embedded... + if (PhysicsDictionaryTextBox.Text == ArchetypeNameTextBox.Text) + { + PhysicsDictHashLabel.Text = "Embedded"; + CurrentArchetype._BaseArchetypeDef.physicsDictionary = CurrentArchetype._BaseArchetypeDef.name; + return; + } + + var hash = 0u; + if (!uint.TryParse(PhysicsDictionaryTextBox.Text, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(PhysicsDictionaryTextBox.Text); + } + + if (CurrentArchetype._BaseArchetypeDef.physicsDictionary != hash) + { + CurrentArchetype._BaseArchetypeDef.physicsDictionary = hash; + var ybn = ProjectForm.GameFileCache.GetYbn(hash); + if (ybn == null) + { + PhysicsDictHashLabel.Text = "Hash: " + hash.ToString() + " (invalid)"; + ProjectForm.SetYtypHasChanged(true); + return; + } + ProjectForm.SetYtypHasChanged(true); + } + PhysicsDictHashLabel.Text = "Hash: " + hash.ToString(); + } + } + private void LodDistNumericUpDown_ValueChanged(object sender, EventArgs e) { var loddist = (float)LodDistNumericUpDown.Value;