private void makeDoor(DrawPoint pt)
{
//First, get name for door
StringPromptDialog dialog = new StringPromptDialog("Please enter the name of the door");
if (dialog.ShowDialog() == DialogResult.OK)
{
if (isDoorNameUnique(dialog.UserInput))
{
//Create the door
Vector2 postition = new Vector2(
pt.X - (EditorConstants.DEFAULT_DOOR_SIZE / 2),
pt.Y - (EditorConstants.DEFAULT_DOOR_SIZE / 2));
string boundsFile = currdir + "\\Art\\Doors\\Door.tri";
Door door = new Door(postition, boundsFile, dialog.UserInput, currentlySelectedRoom);
//Add it to the current room
currentlySelectedRoom.AddObject(door);
}
else
{
showMessage("Name Entry Error",
"A door already exists in the current room with the name " + dialog.UserInput);
}
}
}