mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-16 12:25:27 +08:00
Nav mesh editing improvements
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user