コード例 #1
0
        public MapEditor(string dataPath)
        {
            mapEditorProperties = new MapEditorProperties(this);

            InitializeComponent();

            mapRenderer = new MapRenderer(this.mapDisplayPicture.Handle, this.tileSetPicture.Handle, mapEditorProperties);

            this.mapEditorProperties.CurrentLayer = Map.Layers.Ground;

            this.dataPath = dataPath;

            this.LoadMaps();

            this.tileSetScrollX.Maximum = (int)mapRenderer.CurrentTileSetWidth / 32;
            this.tileSetScrollY.Maximum = (int)mapRenderer.CurrentTileSetHeight / 32;

            this.mapScrollY.SmallChange = 1;
            this.mapScrollY.LargeChange = 1;

            this.mapScrollX.SmallChange = 1;
            this.mapScrollX.LargeChange = 1;

            this.mapPropertyGrid.SelectedObject = mapEditorProperties;
        }
コード例 #2
0
 private void MapEditor_FormClosed(object sender, FormClosedEventArgs e)
 {
     this.mapRenderer.Running = false;
     this.SaveData();
     this.mapRenderer = null;
 }