Exemplo n.º 1
0
        /// <summary>
        /// Menu Command: Map Properties
        /// </summary>
        public static void ViewMapProperties()
        {
            int originalWidth  = MapEditor.Instance.CurrentMap.MapWidth;
            int originalHeight = MapEditor.Instance.CurrentMap.MapHeight;

            MapPropertiesForm form = new MapPropertiesForm();

            form.Map = MapEditor.Instance.CurrentMap;
            form.ShowDialog();

            // check to see if the Map was resized.
            if (MapEditor.Instance.CurrentMap.MapWidth != originalWidth || MapEditor.Instance.CurrentMap.MapHeight != originalHeight)
            {
                MapEditor.Instance.CurrentMap = MapFactory.CopyWithNewSize(form.Map, form.Map.MapWidth, form.Map.MapHeight);
            }
        }