Nav mesh progress

This commit is contained in:
dexyfex
2018-05-02 00:28:47 +10:00
Unverified
parent bab6668021
commit b18b1e7672
4 changed files with 64 additions and 38 deletions
+15 -15
View File
@@ -46,14 +46,14 @@
this.label4 = new System.Windows.Forms.Label();
this.DeletePolyButton = new System.Windows.Forms.Button();
this.AddToProjectButton = new System.Windows.Forms.Button();
this.PortalTypeUpDown = new System.Windows.Forms.NumericUpDown();
this.PortalCountUpDown = new System.Windows.Forms.NumericUpDown();
this.label6 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.AreaIDUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PartIDUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PortalIDUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.UnkXUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.UnkYUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PortalTypeUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PortalCountUpDown)).BeginInit();
this.SuspendLayout();
//
// AreaIDUpDown
@@ -273,34 +273,34 @@
this.AddToProjectButton.UseVisualStyleBackColor = true;
this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click);
//
// PortalTypeUpDown
// PortalCountUpDown
//
this.PortalTypeUpDown.Location = new System.Drawing.Point(495, 12);
this.PortalTypeUpDown.Maximum = new decimal(new int[] {
this.PortalCountUpDown.Location = new System.Drawing.Point(495, 12);
this.PortalCountUpDown.Maximum = new decimal(new int[] {
15,
0,
0,
0});
this.PortalTypeUpDown.Name = "PortalTypeUpDown";
this.PortalTypeUpDown.Size = new System.Drawing.Size(57, 20);
this.PortalTypeUpDown.TabIndex = 8;
this.PortalTypeUpDown.ValueChanged += new System.EventHandler(this.PortalTypeUpDown_ValueChanged);
this.PortalCountUpDown.Name = "PortalCountUpDown";
this.PortalCountUpDown.Size = new System.Drawing.Size(57, 20);
this.PortalCountUpDown.TabIndex = 8;
this.PortalCountUpDown.ValueChanged += new System.EventHandler(this.PortalCountUpDown_ValueChanged);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(429, 14);
this.label6.Location = new System.Drawing.Point(424, 14);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(60, 13);
this.label6.Size = new System.Drawing.Size(67, 13);
this.label6.TabIndex = 7;
this.label6.Text = "Portal type:";
this.label6.Text = "Portal count:";
//
// EditYnvPolyPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(562, 404);
this.Controls.Add(this.PortalTypeUpDown);
this.Controls.Add(this.PortalCountUpDown);
this.Controls.Add(this.label6);
this.Controls.Add(this.DeletePolyButton);
this.Controls.Add(this.AddToProjectButton);
@@ -327,7 +327,7 @@
((System.ComponentModel.ISupportInitialize)(this.PortalIDUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.UnkXUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.UnkYUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PortalTypeUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PortalCountUpDown)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -352,7 +352,7 @@
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button DeletePolyButton;
private System.Windows.Forms.Button AddToProjectButton;
private System.Windows.Forms.NumericUpDown PortalTypeUpDown;
private System.Windows.Forms.NumericUpDown PortalCountUpDown;
private System.Windows.Forms.Label label6;
}
}
+6 -6
View File
@@ -48,7 +48,7 @@ namespace CodeWalker.Project.Panels
AreaIDUpDown.Value = 0;
PartIDUpDown.Value = 0;
PortalIDUpDown.Value = 0;
PortalTypeUpDown.Value = 0;
PortalCountUpDown.Value = 0;
SetCheckedListBoxValues(FlagsCheckedListBox1, 0);
SetCheckedListBoxValues(FlagsCheckedListBox2, 0);
SetCheckedListBoxValues(FlagsCheckedListBox3, 0);
@@ -65,7 +65,7 @@ namespace CodeWalker.Project.Panels
AreaIDUpDown.Value = YnvPoly.AreaID;
PartIDUpDown.Value = YnvPoly.PartID;
PortalIDUpDown.Value = YnvPoly.PortalLinkID;
PortalTypeUpDown.Value = YnvPoly.PortalType;
PortalCountUpDown.Value = YnvPoly.PortalLinkCount;
SetCheckedListBoxValues(FlagsCheckedListBox1, YnvPoly.Flags1);
SetCheckedListBoxValues(FlagsCheckedListBox2, YnvPoly.Flags2);
SetCheckedListBoxValues(FlagsCheckedListBox3, YnvPoly.Flags3);
@@ -152,16 +152,16 @@ namespace CodeWalker.Project.Panels
}
}
private void PortalTypeUpDown_ValueChanged(object sender, EventArgs e)
private void PortalCountUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPoly == null) return;
byte portalunk = (byte)PortalTypeUpDown.Value;
byte portalcount = (byte)PortalCountUpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPoly.PortalType != portalunk)
if (YnvPoly.PortalLinkCount != portalcount)
{
YnvPoly.PortalType = portalunk;
YnvPoly.PortalLinkCount = portalcount;
ProjectForm.SetYnvHasChanged(true);
}
}