0 votes

Hi everyone :)
I would like to append arguments to the front of the default array passed to the callback :

var aParamPath = "anchorleft"
var aSpinBox = SpinBox.new()
changed", self, "set", [aParamPath, value])

Of course this code doesn't compile because the compiler doesn't know what value is.
I want it to be the arg of value_changed(float value) signal

Is this possible ? How ?

For now i solved it this way but i think we can find better :

paramcontrol.connect("valuechanged", self, "setswap", [paramnode, param.param_id])

func setswap(value, paramnode, parampath):
node.set(param_path, value)

Thank you very much

asked 5 days ago in Engine by Superyen (14 points)
edited 5 days ago by Superyen

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.