Ejemplo n.º 1
0
        public MapForm(ProjectMainForm parent, Map m, Spriteset ss, Sprite s)
        {
            m_parent = parent;

            m_ss = ss;

            InitializeComponent();

            SetMap(m);
            m_toolbox = new Toolbox_Map();
            m_optionbox = new Optionbox_Map();

            MdiParent = parent;
            FormBorderStyle = FormBorderStyle.SizableToolWindow;
            StartPosition = FormStartPosition.Manual;
            Visible = false;
            ControlBox = false;

            // Set to 16x.
            cbZoom.SelectedIndex = (int)ZoomLevel.Zoom_16x;
            cbZoom.Enabled = false;

            m_tileSpriteX = -1;
            m_tileSpriteY = -1;
        }
Ejemplo n.º 2
0
        public UndoAction_MapEdit(UndoMgr mgr, Map m, Map.UndoData before, Map.UndoData after, string strDesc)
        {
            m_mgr = mgr;
            m_map = m;
            m_before = new Map.UndoData(before);
            m_after = new Map.UndoData(after);

            Description = "MapEdit " + m.Name + " " + strDesc;
        }
Ejemplo n.º 3
0
        public Map AddMap(string strName, int id, string strDesc, Spriteset bgtiles)
        {
            if (m_maps.ContainsKey(id))
                return null;

            Map m = new Map(m_doc, strName, id, strDesc, bgtiles);
            m_maps.Add(id, m);
            m_mapCurrent = m;
            return m;
        }
Ejemplo n.º 4
0
 public void Clear()
 {
     m_maps.Clear();
     m_mapCurrent = null;
 }
Ejemplo n.º 5
0
        public void SetMap(Map m)
        {
            m_map = m;
            pbMap.Invalidate();

            // Update title with map name.
            if (m != null)
                Text = "Map '" + m.Name + "'";
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Add a map to the list of maps that are based on this SpriteList.
 /// Only used for background SpriteLists.
 /// </summary>
 /// <param name="m">The map</param>
 public void AddMap(Map m)
 {
     m_Maps.Add(m);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// The map data has changed.
 /// </summary>
 public void HandleMapDataChange(Map m)
 {
     m_doc.HasUnsavedChanges = true;
     m.MapWindow.MapDataChanged();
 }