Ejemplo n.º 1
0
        private void dungeonToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewDungeonDialog dialog = new NewDungeonDialog();

            if (dialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }

            if (myCurrentMap != null)
            {
                myCurrentMap.Dispose();
            }

            myLastSavePath = "";
            Text           = "Lewt Chunk Editor - untitled.cnk";

            CurToolGB.Enabled   = true;
            TilePropsGB.Enabled = true;
            ChunkViewGB.Enabled = true;

            myCurrentMap = new EditorMap(true, dialog.ChunkWidth, dialog.ChunkHeight, dialog.ChunkSkin);

            myMapTypes = dialog.MapTypes;

            myConArrows = new List <ConnectorArrow>[]
            {
                new List <ConnectorArrow>(),
                new List <ConnectorArrow>(),
                new List <ConnectorArrow>(),
                new List <ConnectorArrow>()
            };

            RenderMap();
        }
Ejemplo n.º 2
0
        private void Open(String filePath = "")
        {
            if (filePath == "")
            {
                filePath = GetLoadDestination();
            }

            if (filePath == "")
            {
                return;
            }

            ChunkTemplate temp = new ChunkTemplate(filePath);

            myLastSavePath = filePath;
            Text           = "Lewt Chunk Editor - " + filePath;

            if (myCurrentMap != null)
            {
                myCurrentMap.Dispose();
            }

            myCurrentMap = new EditorMap(true, temp);

            myMapTypes = temp.MapTypes;

            myConArrows = new List <ConnectorArrow>[]
            {
                new List <ConnectorArrow>(),
                new List <ConnectorArrow>(),
                new List <ConnectorArrow>(),
                new List <ConnectorArrow>()
            };

            for (int i = 0; i < 4; ++i)
            {
                ChunkConnector[] cons = temp.GetConnectors((ConnectorFace)i);
                foreach (ChunkConnector con in cons)
                {
                    myConArrows[i].Add(new ConnectorArrow(con.X, con.Y, con.Horizontal, con.Size));
                }
            }

            CurToolGB.Enabled   = true;
            TilePropsGB.Enabled = true;
            ChunkViewGB.Enabled = true;

            RenderMap();
        }
Ejemplo n.º 3
0
        private void exteriorChunkToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (myCurrentMap != null)
            {
                myCurrentMap.Dispose();
            }

            myLastSavePath = "";
            Text           = "Lewt Chunk Editor - untitled.cnk";

            CurToolGB.Enabled   = true;
            TilePropsGB.Enabled = true;
            ChunkViewGB.Enabled = true;

            myCurrentMap = new EditorMap(false, 16, 16, 0);

            RenderMap();
        }