public bool RemoveLayer(CellSurfaceLayer item) { bool result = _layers.Remove(item); if (_layers.Count == 0) { Cells = new Cell[Width * Height]; for (int i = 0; i < Cells.Length; i++) { Cells[i] = new Cell(DefaultForeground, DefaultBackground, 0); } OnCellsReset(); } else { Cells = _layers[0].Cells; } IsDirty = true; return(result); }
public void InsertLayer(int index, CellSurfaceLayer item) { _layers.Insert(index, item); Cells = _layers[0].Cells; IsDirty = true; }
public int IndexOf(CellSurfaceLayer item) => _layers.IndexOf(item);
public bool ContainsLayer(CellSurfaceLayer item) => _layers.Contains(item);
public void AddLayer(CellSurfaceLayer item) { _layers.Add(item); Cells = _layers[0].Cells; IsDirty = true; }
public int IndexOf(CellSurfaceLayer item) { return(_layers.IndexOf(item)); }