public RoomSelectDialog(GameWorld wld, bool selectRoom, string title)
{
world = wld;
this.selectRoom = selectRoom;
InitializeComponent();
this.Text = title;
//If we are just selecting a room, then hide the door stuff.
if (selectRoom)
{
this.doors_ListBox.Enabled = false;
this.exit_Label.Enabled = false;
}
//Populate the list of rooms in the world
foreach (Room room in world.Rooms)
{
room_ListBox.Items.Add(room.name);
}
room_ListBox.SelectedIndex = 0;
}