コード例 #1
0
 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;
 }
コード例 #2
0
        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);
        }