mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Support string->value conversions for Diopser's most important parameter
This commit is contained in:
@@ -202,6 +202,16 @@ impl DiopserParams {
|
||||
.with_value_to_string(Arc::new(|value| {
|
||||
String::from(if value { "please don't" } else { "stop it" })
|
||||
}))
|
||||
.with_string_to_value(Arc::new(|string| {
|
||||
let string = string.trim();
|
||||
if string.eq_ignore_ascii_case("please don't") {
|
||||
Some(true)
|
||||
} else if string.eq_ignore_ascii_case("stop it") {
|
||||
Some(false)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}))
|
||||
.hide_in_generic_ui(),
|
||||
|
||||
automation_precision: FloatParam::new(
|
||||
|
||||
Reference in New Issue
Block a user