mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-19 11:52:13 +08:00
Collisions editing progress
This commit is contained in:
@@ -74,6 +74,8 @@ namespace CodeWalker.Project.Panels
|
||||
var b = CollisionBounds;
|
||||
if (b == null)
|
||||
{
|
||||
AddToProjectButton.Enabled = false;
|
||||
DeleteButton.Enabled = false;
|
||||
BBMinTextBox.Text = string.Empty;
|
||||
BBMaxTextBox.Text = string.Empty;
|
||||
BBCenterTextBox.Text = string.Empty;
|
||||
@@ -144,6 +146,10 @@ namespace CodeWalker.Project.Panels
|
||||
PolyCountLabel.Text = "0 polygons";
|
||||
}
|
||||
|
||||
var ybn = b.GetRootYbn();
|
||||
AddToProjectButton.Enabled = (ybn != null) ? !ProjectForm.YbnExistsInProject(ybn) : false;
|
||||
DeleteButton.Enabled = !AddToProjectButton.Enabled;
|
||||
|
||||
populatingui = false;
|
||||
}
|
||||
}
|
||||
@@ -447,5 +453,17 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddToProjectButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ProjectForm.SetProjectItem(CollisionBounds);
|
||||
ProjectForm.AddCollisionBoundsToProject();
|
||||
}
|
||||
|
||||
private void DeleteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ProjectForm.SetProjectItem(CollisionBounds);
|
||||
ProjectForm.DeleteCollisionBounds();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user