private void MapControl_PropChanged(object sender, EventArgs e) { LayerEditor.Layers.StartLayer = Map.StartLayer; LayerEditor.Layers.Invalidate(); EntitiesControl.UpdateList(Map.Entities, Map.Layers); TilesetControl.Select(MapControl.CurrentTile); SelectTiles(TilesetControl.Selected); MapControl.SelWidth = 1; }
private void InitLayers() { LayerEditor.Layers.ClearItems(); foreach (Layer lay in MapControl.BaseMap.Layers) { LayerItem item = new LayerItem(lay); LayerEditor.Layers.AddItem(item); } foreach (Entity ent in Map.Entities) { ent.Visible = Map.Layers[ent.Layer].Visible; } foreach (Zone zone in Map.Zones) { zone.Visible = Map.Layers[zone.Layer].Visible; } LayerEditor.Layers.StartLayer = MapControl.BaseMap.StartLayer; LayerEditor.Layers.SelectItem(MapControl.CurrentLayer); EntitiesControl.UpdateList(Map.Entities, Map.Layers); }