Exemplo n.º 1
0
 // Add New Level...
 private void addLevelToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (LevelAddForm form = new LevelAddForm(editorControl.World)) {
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             Level level = new Level(form.LevelName, form.LevelWidth, form.LevelHeight,
                                     GameSettings.DEFAULT_TILE_LAYER_COUNT, form.LevelRoomSize, form.LevelZone);
             // Setup the level with default tiles.
             level.FillWithDefaultTiles();
             editorControl.AddLevel(level, true);
         }
     }
 }
Exemplo n.º 2
0
 private void buttonTreeViewNewLevel_Click(object sender, EventArgs e)
 {
     using (LevelAddForm form = new LevelAddForm()) {
         if (form.ShowDialog(this) == DialogResult.OK) {
             Level level = new Level(form.LevelName, form.LevelWidth, form.LevelHeight,
                 form.LevelLayerCount, form.LevelRoomSize, form.LevelZone);
             editorControl.AddLevel(level, true);
             treeViewWorld.SelectedNode = treeViewWorld.Nodes[0].Nodes[0].Nodes[treeViewWorld.Nodes[0].Nodes[0].Nodes.Count - 1];
         }
     }
 }
Exemplo n.º 3
0
 // Add Level...
 private void addLevelToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (LevelAddForm form = new LevelAddForm()) {
         if (form.ShowDialog(this) == DialogResult.OK) {
             Level level = new Level(form.LevelName, form.LevelWidth, form.LevelHeight,
                 form.LevelLayerCount, form.LevelRoomSize, form.LevelZone);
             editorControl.AddLevel(level, true);
         }
     }
 }
Exemplo n.º 4
0
 // Add New Level...
 private void addLevelToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (LevelAddForm form = new LevelAddForm(editorControl.World)) {
         if (form.ShowDialog(this) == DialogResult.OK) {
             Level level = new Level(form.LevelName, form.LevelWidth, form.LevelHeight,
                 GameSettings.DEFAULT_TILE_LAYER_COUNT, form.LevelRoomSize, form.LevelZone);
             // Setup the level with default tiles.
             level.FillWithDefaultTiles();
             editorControl.AddLevel(level, true);
         }
     }
 }