add all polygon to choice
This commit is contained in:
52
src/main.rs
52
src/main.rs
@@ -75,15 +75,47 @@ impl MyApp {
|
|||||||
match s.as_str() {
|
match s.as_str() {
|
||||||
"Segment" => {
|
"Segment" => {
|
||||||
poly = Polygon::segment(0.0, self.default_sound.clone());
|
poly = Polygon::segment(0.0, self.default_sound.clone());
|
||||||
poly.name = "Segment".to_string()
|
poly.name = "Segment".to_string();
|
||||||
}
|
}
|
||||||
"Triangle" => {
|
"Triangle" => {
|
||||||
poly = Polygon::triangle(0.0, self.default_sound.clone());
|
poly = Polygon::triangle(0.0, self.default_sound.clone());
|
||||||
poly.name = "Triangle".to_string()
|
poly.name = "Triangle".to_string();
|
||||||
}
|
}
|
||||||
"Square" => {
|
"Square" => {
|
||||||
poly = Polygon::square(0.0, self.default_sound.clone());
|
poly = Polygon::square(0.0, self.default_sound.clone());
|
||||||
poly.name = "Square".to_string()
|
poly.name = "Square".to_string();
|
||||||
|
}
|
||||||
|
"Nr6In30" => {
|
||||||
|
poly = Polygon::nr_6_in_30(0.0, self.default_sound.clone());
|
||||||
|
poly.name = "Nr6In30".to_string();
|
||||||
|
}
|
||||||
|
"Nr7In30" => {
|
||||||
|
poly = Polygon::nr_7_in_30(0.0, self.default_sound.clone());
|
||||||
|
poly.name = "Nr7In30".to_string();
|
||||||
|
}
|
||||||
|
"Nr8In30" => {
|
||||||
|
poly = Polygon::nr_8_in_30(0.0, self.default_sound.clone());
|
||||||
|
poly.name = "Nr8In30".to_string();
|
||||||
|
}
|
||||||
|
"Nr9In30" => {
|
||||||
|
poly = Polygon::nr_9_in_30(0.0, self.default_sound.clone());
|
||||||
|
poly.name = "Nr9In30".to_string();
|
||||||
|
}
|
||||||
|
"Nr8In42" => {
|
||||||
|
poly = Polygon::nr_8_in_42(0.0, self.default_sound.clone());
|
||||||
|
poly.name = "Nr8In42".to_string();
|
||||||
|
}
|
||||||
|
"Nr9In42" => {
|
||||||
|
poly = Polygon::nr_9_in_42(0.0, self.default_sound.clone());
|
||||||
|
poly.name = "Nr9In42".to_string();
|
||||||
|
}
|
||||||
|
"Nr10aIn42" => {
|
||||||
|
poly = Polygon::nr_10a_in_42(0.0, self.default_sound.clone());
|
||||||
|
poly.name = "Nr10aIn42".to_string();
|
||||||
|
}
|
||||||
|
"Nr10bIn42" => {
|
||||||
|
poly = Polygon::nr_10b_in_42(0.0, self.default_sound.clone());
|
||||||
|
poly.name = "Nr10bIn42".to_string();
|
||||||
}
|
}
|
||||||
_ => poly = Polygon::n_gon(0.0, 0, self.default_sound.clone()),
|
_ => poly = Polygon::n_gon(0.0, 0, self.default_sound.clone()),
|
||||||
}
|
}
|
||||||
@@ -172,7 +204,19 @@ impl MyApp {
|
|||||||
],
|
],
|
||||||
text("Polygon options"),
|
text("Polygon options"),
|
||||||
pick_list(
|
pick_list(
|
||||||
["Segment", "Triangle", "Square"]
|
[
|
||||||
|
"Segment",
|
||||||
|
"Triangle",
|
||||||
|
"Square",
|
||||||
|
"Nr6In30",
|
||||||
|
"Nr7In30",
|
||||||
|
"Nr8In30",
|
||||||
|
"Nr9In30",
|
||||||
|
"Nr8In42",
|
||||||
|
"Nr9In42",
|
||||||
|
"Nr10aIn42",
|
||||||
|
"Nr10bIn42"
|
||||||
|
]
|
||||||
.map(|s| s.to_string())
|
.map(|s| s.to_string())
|
||||||
.to_vec(),
|
.to_vec(),
|
||||||
Some("Chose polygon".to_string()),
|
Some("Chose polygon".to_string()),
|
||||||
|
|||||||
Reference in New Issue
Block a user