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; }
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; }
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; }
public void Clear() { m_maps.Clear(); m_mapCurrent = null; }
public void SetMap(Map m) { m_map = m; pbMap.Invalidate(); // Update title with map name. if (m != null) Text = "Map '" + m.Name + "'"; }
/// <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); }
/// <summary> /// The map data has changed. /// </summary> public void HandleMapDataChange(Map m) { m_doc.HasUnsavedChanges = true; m.MapWindow.MapDataChanged(); }