Beispiel #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (custom.Enabled)
     {
         l.textures.ChangeEdge(custom.Text);
     }
     else if (comboBox1.SelectedIndex != -1)
     {
         byte block = Block.Byte(comboBox1.Items[comboBox1.SelectedIndex].ToString().Replace(' ', '_'));
         try
         {
             if (comboBox1.Items[comboBox1.SelectedIndex].ToString().Split(' ')[1].StartsWith("("))
             {
                 block = Block.Byte(comboBox1.Items[comboBox1.SelectedIndex].ToString().Split(' ')[0]);
             }
         }
         catch { }
         l.textures.ChangeEdge(block);
     }
     l.textures.ChangeLevel(int.Parse("" + numericUpDown1.Value));
     l.textures.enabled = checkBox1.Checked;
     l.textures.autou   = checkBox2.Checked;
     l.textures.SaveSettings();
     if (cloud.Text != "")
     {
         l.textures.ChangeCloud(cloud.Text);
     }
     if (fog.Text != "")
     {
         l.textures.ChangeFog(fog.Text);
     }
     if (sky.Text != "")
     {
         l.textures.ChangeSky(sky.Text);
     }
     if (terr.Text != "")
     {
         l.textures.terrainid = terr.Text;
     }
     if (custom_side.Enabled)
     {
         l.textures.side = custom_side.Text;
     }
     else if (side.SelectedIndex != -1)
     {
         byte block = Block.Byte(side.Items[side.SelectedIndex].ToString().Replace(' ', '_'));
         try
         {
             if (side.Items[side.SelectedIndex].ToString().Split(' ')[1].StartsWith("("))
             {
                 block = Block.Byte(side.Items[side.SelectedIndex].ToString().Split(' ')[0]);
             }
         }
         catch { }
         l.textures.side = LevelTextures.GetBlockTexture(block);
     }
     l.textures.CreateCFG();
     this.Hide();
     this.Dispose();
 }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (custom.Enabled)
     {
         l.textures.ChangeEdge(custom.Text);
     }
     else if (comboBox1.SelectedIndex != -1)
     {
         byte block = Block.Byte(comboBox1.Items[comboBox1.SelectedIndex].ToString().Replace(' ', '_'));
         try
         {
             //To prevent something like this:
             //Water (Default)
             //We just want "Water"
             if (comboBox1.Items[comboBox1.SelectedIndex].ToString().Split(' ')[1].StartsWith("("))
             {
                 block = Block.Byte(comboBox1.Items[comboBox1.SelectedIndex].ToString().Split(' ')[0]);
             }
         }
         catch { }
         l.textures.ChangeEdge(block);
     }
     if (cloud.Text != "")
     {
         l.textures.ChangeCloud(cloud.Text);
     }
     if (fog.Text != "")
     {
         l.textures.ChangeFog(fog.Text);
     }
     if (sky.Text != "")
     {
         l.textures.ChangeSky(sky.Text);
     }
     if (terr.Text != "")
     {
         l.textures.terrainid = terr.Text;
     }
     if (custom_side.Enabled)
     {
         l.textures.side = custom_side.Text;
     }
     else if (side.SelectedIndex != -1)
     {
         byte block = Block.Byte(side.Items[side.SelectedIndex].ToString().Replace(' ', '_'));
         try
         {
             //To prevent something like this:
             //Water (Default)
             //We just want "Water"
             if (side.Items[side.SelectedIndex].ToString().Split(' ')[1].StartsWith("("))
             {
                 block = Block.Byte(side.Items[side.SelectedIndex].ToString().Split(' ')[0]);
             }
         }
         catch { }
         l.textures.side = LevelTextures.GetBlockTexture(block);
     }
     l.textures.CreateCFG();
     this.Hide();
     this.Dispose();
 }