Nav mesh editing improvements

This commit is contained in:
dexyfex
2018-03-11 01:12:08 +11:00
Unverified
parent 6eb2269597
commit 9e448fdacc
5 changed files with 163 additions and 73 deletions
+33
View File
@@ -48,6 +48,7 @@ namespace CodeWalker.Project.Panels
AreaIDUpDown.Value = 0;
PartIDUpDown.Value = 0;
PortalIDUpDown.Value = 0;
PortalUnkUpDown.Value = 0;
SetCheckedListBoxValues(FlagsCheckedListBox1, 0);
SetCheckedListBoxValues(FlagsCheckedListBox2, 0);
SetCheckedListBoxValues(FlagsCheckedListBox3, 0);
@@ -64,6 +65,7 @@ namespace CodeWalker.Project.Panels
AreaIDUpDown.Value = YnvPoly.AreaID;
PartIDUpDown.Value = YnvPoly.PartID;
PortalIDUpDown.Value = YnvPoly.PortalID;
PortalUnkUpDown.Value = YnvPoly.PortalUnk;
SetCheckedListBoxValues(FlagsCheckedListBox1, YnvPoly.Flags1);
SetCheckedListBoxValues(FlagsCheckedListBox2, YnvPoly.Flags2);
SetCheckedListBoxValues(FlagsCheckedListBox3, YnvPoly.Flags3);
@@ -150,6 +152,21 @@ namespace CodeWalker.Project.Panels
}
}
private void PortalUnkUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (YnvPoly == null) return;
byte portalunk = (byte)PortalUnkUpDown.Value;
lock (ProjectForm.ProjectSyncRoot)
{
if (YnvPoly.PortalUnk != portalunk)
{
YnvPoly.PortalUnk = portalunk;
ProjectForm.SetYnvHasChanged(true);
}
}
}
private void FlagsCheckedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (populatingui) return;
@@ -163,6 +180,10 @@ namespace CodeWalker.Project.Panels
ProjectForm.SetYnvHasChanged(true);
}
}
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.UpdateNavPolyGraphics(YnvPoly, false);
}
}
private void FlagsCheckedListBox2_ItemCheck(object sender, ItemCheckEventArgs e)
@@ -178,6 +199,10 @@ namespace CodeWalker.Project.Panels
ProjectForm.SetYnvHasChanged(true);
}
}
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.UpdateNavPolyGraphics(YnvPoly, false);
}
}
private void FlagsCheckedListBox3_ItemCheck(object sender, ItemCheckEventArgs e)
@@ -193,6 +218,10 @@ namespace CodeWalker.Project.Panels
ProjectForm.SetYnvHasChanged(true);
}
}
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.UpdateNavPolyGraphics(YnvPoly, false);
}
}
private void FlagsCheckedListBox4_ItemCheck(object sender, ItemCheckEventArgs e)
@@ -208,6 +237,10 @@ namespace CodeWalker.Project.Panels
ProjectForm.SetYnvHasChanged(true);
}
}
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.UpdateNavPolyGraphics(YnvPoly, false);
}
}
private void UnkXUpDown_ValueChanged(object sender, EventArgs e)