private void customMapButton_Click(object sender, EventArgs e) { if (terrain != null) { string choice = customMapSelect.Text; double minSlope = (double)minSlopeNum.Value; double minSlopeFuzz = (double)minSlopeFuzzNum.Value; double maxSlope = (double)maxSlopeNum.Value; double maxSlopeFuzz = (double)maxSlopeFuzzNum.Value; double minAlt = (double)minAltNum.Value; double minAltFuzz = (double)minAltFuzzNum.Value; double maxSplatAlt = (double)maxSplatAltNum.Value; double maxAltFuzz = (double)maxAltFuzzNum.Value; double splatNoiseAmount = (double)splatNoiseAmountNum.Value; switch (choice) { case "Custom 1": customMap1Picture.Image = terrain.getSplatMap(minAlt, maxSplatAlt, minAltFuzz, maxAltFuzz, minSlope, maxSlope, minSlopeFuzz, maxSlopeFuzz, splatNoiseAmount); break; case "Custom 2": customMap2Picture.Image = terrain.getSplatMap(minAlt, maxSplatAlt, minAltFuzz, maxAltFuzz, minSlope, maxSlope, minSlopeFuzz, maxSlopeFuzz, splatNoiseAmount); break; default: MessageBox.Show("Please make a valid selection."); break; } } else { MessageBox.Show("Please generate or import a terrain first."); } }