Able to right-click and delete shapes

This commit is contained in:
2018-02-28 12:18:04 -06:00
parent e3fe80ea42
commit 9f2974cf6b
2 changed files with 33 additions and 4 deletions

View File

@ -1139,12 +1139,19 @@ namespace EduNetworkBuilder
Shapes.Add(what);
}
public void RemoveShape(NetShape What)
{
Shapes.Remove(What);
}
public NetShape ShapeAtPoint(Point location)
{
foreach(NetShape shape in Shapes)
{
if (shape.CornersAreClickedOn(location))
return shape;
if (shape.CenterIsClickedOn(location))
return shape;
}
return null;
}