nodeparam: implemented parameters that allow arbitrary properties to be set

for UI representations

Allows properties to be set without adding explicit extra members to NodeInputs.
Crucially this means parameters like slider value representations (percent,
decibel, etc.) can be set from NodeInputs now.
This commit is contained in:
itsmattkc
2020-03-07 01:21:36 +11:00
parent d12a0dca23
commit c168bf1a80
8 changed files with 118 additions and 133 deletions
+3 -2
View File
@@ -6,8 +6,9 @@ VolumeNode::VolumeNode()
AddInput(samples_input_);
volume_input_ = new NodeInput("volume_in", NodeParam::kFloat, 1);
volume_input_->set_minimum(0);
volume_input_->set_maximum(1);
volume_input_->set_property("min", 0.0);
volume_input_->set_property("max", 1.0);
volume_input_->set_property("view", "db");
AddInput(volume_input_);
}